ReactOS 0.4.16-dev-1339-gd8bfa93
format.c
Go to the documentation of this file.
1//======================================================================
2//
3// Formatx
4//
5// Copyright (c) 1998 Mark Russinovich
6// Systems Internals
7// http://www.sysinternals.com
8//
9// Format clone that demonstrates the use of the FMIFS file system
10// utility library.
11//
12// --------------------------------------------------------------------
13//
14// This software is free software; you can redistribute it and/or
15// modify it under the terms of the GNU Library General Public License as
16// published by the Free Software Foundation; either version 2 of the
17// License, or (at your option) any later version.
18//
19// This software is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22// Library General Public License for more details.
23//
24// You should have received a copy of the GNU Library General Public
25// License along with this software; see the file COPYING.LIB. If
26// not, write to the Free Software Foundation, Inc., 675 Mass Ave,
27// Cambridge, MA 02139, USA.
28//
29// --------------------------------------------------------------------
30//
31// 1999 February (Emanuele Aliberti)
32// Adapted for ReactOS and lcc-win32.
33//
34// 1999 April (Emanuele Aliberti)
35// Adapted for ReactOS and egcs.
36//
37// 2003 April (Casper S. Hornstrup)
38// Reintegration.
39//
40//======================================================================
41
42#include <stdio.h>
43#include <tchar.h>
44
45/* PSDK/NDK Headers */
46#define WIN32_NO_STATUS
47#include <windef.h>
48#include <winbase.h>
49
50#include <conutils.h>
51
52#define NTOS_MODE_USER
53#include <ndk/rtlfuncs.h>
54
55/* FMIFS Public Header */
56#include <fmifs/fmifs.h>
57
58#include "resource.h"
59
60#define FMIFS_IMPORT_DLL
61
62// Globals
64
65// Switches
73
76
77#ifndef FMIFS_IMPORT_DLL
78//
79// Functions in FMIFS.DLL
80//
81PFORMATEX FormatEx;
82PENABLEVOLUMECOMPRESSION EnableVolumeCompression;
83PQUERYAVAILABLEFILESYSTEMFORMAT QueryAvailableFileSystemFormat;
84#endif
85
86
87//
88// Size array
89//
90typedef struct {
91 WCHAR SizeString[16];
94
96 { L"512", 512 },
97 { L"1024", 1024 },
98 { L"2048", 2048 },
99 { L"4096", 4096 },
100 { L"8192", 8192 },
101 { L"16K", 16384 },
102 { L"32K", 32768 },
103 { L"64K", 65536 },
104 { L"128K", 65536 * 2 },
105 { L"256K", 65536 * 4 },
106 { L"", 0 },
107};
108
109
110//----------------------------------------------------------------------
111//
112// PrintWin32Error
113//
114// Takes the win32 error code and prints the text version.
115//
116//----------------------------------------------------------------------
118{
119 ConPrintf(StdErr, L"%s: ", Message);
122 ConPuts(StdErr, L"\n");
123}
124
125
126//----------------------------------------------------------------------
127//
128// ParseCommandLine
129//
130// Get the switches.
131//
132//----------------------------------------------------------------------
133static int ParseCommandLine(int argc, WCHAR *argv[])
134{
135 int i, j;
136 BOOLEAN gotFormat = FALSE;
137 BOOLEAN gotQuick = FALSE;
138 BOOLEAN gotSize = FALSE;
139 BOOLEAN gotLabel = FALSE;
140 BOOLEAN gotCompressed = FALSE;
141
142 for (i = 1; i < argc; i++)
143 {
144 switch (argv[i][0])
145 {
146 case L'-': case L'/':
147
148 if (!_wcsnicmp(&argv[i][1], L"FS:", 3))
149 {
150 if (gotFormat) return -1;
151 FileSystem = &argv[i][4];
152 gotFormat = TRUE;
153 }
154 else if (!_wcsnicmp(&argv[i][1], L"A:", 2))
155 {
156 if (gotSize) return -1;
157 j = 0;
158 while (LegalSizes[j].ClusterSize &&
159 wcsicmp(LegalSizes[j].SizeString, &argv[i][3]))
160 {
161 j++;
162 }
163
164 if (!LegalSizes[j].ClusterSize) return i;
166 gotSize = TRUE;
167 }
168 else if (!_wcsnicmp(&argv[i][1], L"V:", 2))
169 {
170 if (gotLabel) return -1;
171 Label = &argv[i][3];
172 gotLabel = TRUE;
173 GotALabel = TRUE;
174 }
175 else if (!wcsicmp(&argv[i][1], L"Q"))
176 {
177 if (gotQuick) return -1;
179 gotQuick = TRUE;
180 }
181 else if (!wcsicmp(&argv[i][1], L"C"))
182 {
183 if (gotCompressed) return -1;
185 gotCompressed = TRUE;
186 }
187 else
188 {
189 return i;
190 }
191 break;
192
193 default:
194 {
195 if (Drive) return i;
196 if (argv[i][1] != L':') return i;
197
198 Drive = argv[i];
199 break;
200 }
201 }
202 }
203 return 0;
204}
205
206//----------------------------------------------------------------------
207//
208// FormatExCallback
209//
210// The file system library will call us back with commands that we
211// can interpret. If we wanted to halt the chkdsk we could return FALSE.
212//
213//----------------------------------------------------------------------
217 ULONG Modifier,
218 PVOID Argument)
219{
220 PDWORD percent;
221 PTEXTOUTPUT output;
223
224 //
225 // We get other types of commands, but we don't have to pay attention to them
226 //
227 switch (Command)
228 {
229 case PROGRESS:
230 percent = (PDWORD)Argument;
232 break;
233
234 case OUTPUT:
235 output = (PTEXTOUTPUT)Argument;
236 ConPrintf(StdOut, L"%S\n", output->Output);
237 break;
238
239 case DONE:
240 status = (PBOOLEAN)Argument;
241 if (*status == FALSE)
242 {
244 Error = TRUE;
245 }
246 break;
247
249 case UNKNOWN2:
250 case UNKNOWN3:
251 case UNKNOWN4:
252 case UNKNOWN5:
254 case FSNOTSUPPORTED:
255 case VOLUMEINUSE:
256 case UNKNOWN9:
257 case UNKNOWNA:
258 case UNKNOWNC:
259 case UNKNOWND:
263 return FALSE;
264 }
265 return TRUE;
266}
267
268#ifndef FMIFS_IMPORT_DLL
269//----------------------------------------------------------------------
270//
271// LoadFMIFSEntryPoints
272//
273// Loads FMIFS.DLL and locates the entry point(s) we are going to use
274//
275//----------------------------------------------------------------------
276static BOOLEAN LoadFMIFSEntryPoints(VOID)
277{
278 HMODULE hFmifs = LoadLibraryW( L"fmifs.dll");
279 if (hFmifs == NULL)
280 return FALSE;
281
282 FormatEx = (PFORMATEX)GetProcAddress(hFmifs, "FormatEx");
283 if (!FormatEx)
284 {
285 FreeLibrary(hFmifs);
286 return FALSE;
287 }
288
289 EnableVolumeCompression = (PENABLEVOLUMECOMPRESSION)GetProcAddress(hFmifs, "EnableVolumeCompression");
291 {
292 FreeLibrary(hFmifs);
293 return FALSE;
294 }
295
296 QueryAvailableFileSystemFormat = (PQUERYAVAILABLEFILESYSTEMFORMAT)GetProcAddress(hFmifs, "QueryAvailableFileSystemFormat");
298 {
299 FreeLibrary(hFmifs);
300 return FALSE;
301 }
302
303 return TRUE;
304}
305#endif
306
307
308//----------------------------------------------------------------------
309//
310// Usage
311//
312// Tell the user how to use the program
313//
314//----------------------------------------------------------------------
315static VOID Usage(LPWSTR ProgramName)
316{
318 WCHAR szFormats[MAX_PATH];
319 WCHAR szFormatW[MAX_PATH];
320 DWORD Index = 0;
321 BYTE dummy;
322 BOOLEAN latestVersion;
323
325
326 szFormats[0] = 0;
327 while (QueryAvailableFileSystemFormat(Index++, szFormatW, &dummy, &dummy, &latestVersion))
328 {
329 if (!latestVersion)
330 continue;
331 if (szFormats[0])
332 wcscat(szFormats, L", ");
333
334 wcscat(szFormats, szFormatW);
335 }
336 ConPrintf(StdOut, szMsg, ProgramName, szFormats);
337}
338
339
340//----------------------------------------------------------------------
341//
342// WMain
343//
344// Engine. Just get command line switches and fire off a format. This
345// could also be done in a GUI like Explorer does when you select a
346// drive and run a check on it.
347//
348// We do this in UNICODE because the chkdsk command expects PWCHAR
349// arguments.
350//
351//----------------------------------------------------------------------
352int wmain(int argc, WCHAR *argv[])
353{
354 int badArg;
355 DEVICE_INFORMATION DeviceInformation = {0};
357 DWORD driveType;
358 WCHAR fileSystem[1024];
359 WCHAR volumeName[1024] = {0};
360 WCHAR input[1024];
362 ULARGE_INTEGER totalNumberOfBytes, totalNumberOfFreeBytes;
364 DWORD dwError;
365
366 /* Initialize the Console Standard Streams */
368
370 L"\n"
371 L"Formatx v1.0 by Mark Russinovich\n"
372 L"Systems Internals - http://www.sysinternals.com\n"
373 L"ReactOS adaptation 1999 by Emanuele Aliberti\n\n");
374
375#ifndef FMIFS_IMPORT_DLL
376 //
377 // Get function pointers
378 //
379 if (!LoadFMIFSEntryPoints())
380 {
382 return -1;
383 }
384#endif
385
386 //
387 // Parse command line
388 //
389 badArg = ParseCommandLine(argc, argv);
390 if (badArg)
391 {
393 Usage(argv[0]);
394 return -1;
395 }
396
397 //
398 // Get the drive's format
399 //
400 if (!Drive)
401 {
403 Usage(argv[0]);
404 return -1;
405 }
406 else
407 {
409 }
410 RootDirectory[2] = L'\\';
411 RootDirectory[3] = L'\0';
412
413 //
414 // See if the drive is removable or not
415 //
416 driveType = GetDriveTypeW(RootDirectory);
417 switch (driveType)
418 {
419 case DRIVE_UNKNOWN:
420 case DRIVE_NO_ROOT_DIR: // This case used to report STRING_NO_VOLUME, which has no ".\n".
422 return -1;
423
424 case DRIVE_REMOTE:
425 case DRIVE_CDROM:
427 return -1;
428
429 case DRIVE_REMOVABLE:
433 break;
434
435 case DRIVE_FIXED:
436 case DRIVE_RAMDISK:
438 break;
439 }
440
441 // Reject attempts to format the system drive
442 {
443 WCHAR path[MAX_PATH + 1];
444 UINT rc;
446 if (rc == 0 || rc > MAX_PATH)
447 // todo: Report "Unable to query system directory"
448 return -1;
449 if (towlower(path[0]) == towlower(Drive[0]))
450 {
451 // todo: report "Cannot format system drive"
453 return -1;
454 }
455 }
456
457 //
458 // Get the existing name and file system, and print out the latter
459 //
461 volumeName, ARRAYSIZE(volumeName),
462 NULL, NULL, NULL,
463 fileSystem, ARRAYSIZE(fileSystem)))
464 {
465 dwError = GetLastError();
466 if (dwError == ERROR_UNRECOGNIZED_VOLUME)
467 {
468 wcscpy(fileSystem, L"RAW");
469 }
470 else
471 {
473 PrintWin32Error(szMsg, dwError);
474 return -1;
475 }
476 }
477
479
481 &DeviceInformation,
482 sizeof(DeviceInformation)))
483 {
484 totalNumberOfBytes.QuadPart = DeviceInformation.SectorSize *
485 DeviceInformation.SectorCount.QuadPart;
486 }
487
488 /* QueryDeviceInformation returns more accurate volume length and works with
489 * unformatted volumes, however it will NOT return volume length on XP/2003.
490 * Fallback to GetFreeDiskSpaceExW if we did not get any volume length. */
491 if (totalNumberOfBytes.QuadPart == 0 &&
493 NULL,
494 &totalNumberOfBytes,
495 NULL))
496 {
497 dwError = GetLastError();
499 PrintWin32Error(szMsg, dwError);
500 return -1;
501 }
502
503 //
504 // Make sure they want to do this
505 //
506 if (driveType == DRIVE_FIXED)
507 {
508 if (volumeName[0])
509 {
510 while (TRUE)
511 {
514 input[wcslen(input) - 1] = 0;
515
516 if (!wcsicmp(input, volumeName))
517 break;
518
520 }
521 }
522
524
526 while (TRUE)
527 {
529 if (_wcsnicmp(&input[0], &szMsg[0], 1) == 0) break;
530 if (_wcsnicmp(&input[0], &szMsg[1], 1) == 0)
531 {
532 ConPuts(StdOut, L"\n");
533 return 0;
534 }
535 }
536 }
537
538 //
539 // Tell the user we're doing a long format if appropriate
540 //
541 if (!QuickFormat)
542 {
544 if (totalNumberOfBytes.QuadPart > 1024*1024*10)
545 {
546 ConPrintf(StdOut, L"%s %luM\n", szMsg, (DWORD)(totalNumberOfBytes.QuadPart/(1024*1024)));
547 }
548 else
549 {
550 ConPrintf(StdOut, L"%s %.1fM\n", szMsg,
551 ((float)(LONGLONG)totalNumberOfBytes.QuadPart)/(float)(1024.0*1024.0));
552 }
553 }
554 else
555 {
557 if (totalNumberOfBytes.QuadPart > 1024*1024*10)
558 {
559 ConPrintf(StdOut, L"%s %luM\n", szMsg, (DWORD)(totalNumberOfBytes.QuadPart/(1024*1024)));
560 }
561 else
562 {
563 ConPrintf(StdOut, L"%s %.2fM\n", szMsg,
564 ((float)(LONGLONG)totalNumberOfBytes.QuadPart)/(float)(1024.0*1024.0));
565 }
567 }
568
569 //
570 // Format away!
571 //
574 if (Error) return -1;
575 ConPuts(StdOut, L"\n");
577
578 //
579 // Enable compression if desired
580 //
581 if (CompressDrive)
582 {
585 }
586
587 //
588 // Get the label if we don't have it
589 //
590 if (!GotALabel)
591 {
594
595 input[wcslen(input) - 1] = 0;
597 {
598 dwError = GetLastError();
600 PrintWin32Error(szMsg, dwError);
601 return -1;
602 }
603 }
604
605 //
606 // Get and print out some stuff including the formatted size
607 //
609 NULL,
610 &totalNumberOfBytes,
611 &totalNumberOfFreeBytes))
612 {
613 dwError = GetLastError();
615 PrintWin32Error(szMsg, dwError);
616 return -1;
617 }
618
619 ConResPrintf(StdOut, STRING_FREE_SPACE, totalNumberOfBytes.QuadPart,
620 totalNumberOfFreeBytes.QuadPart);
621
622 //
623 // Get and print out the new serial number
624 //
626 NULL, 0,
628 NULL, 0))
629 {
630 dwError = GetLastError();
632 PrintWin32Error(szMsg, dwError);
633 return -1;
634 }
635
637 (unsigned int)(serialNumber >> 16),
638 (unsigned int)(serialNumber & 0xFFFF));
639
640 return 0;
641}
642
643/* EOF */
unsigned char BOOLEAN
static int argc
Definition: ServiceArgs.c:12
#define RC_STRING_MAX_SIZE
Definition: resource.h:3
void ConPuts(FILE *fp, LPCWSTR psz)
Definition: fc.c:16
#define ConInitStdStreams()
Definition: fc.c:13
void ConPrintf(FILE *fp, LPCWSTR psz,...)
Definition: fc.c:20
#define StdOut
Definition: fc.c:14
void ConResPrintf(FILE *fp, UINT nID,...)
Definition: fc.c:33
#define StdErr
Definition: fc.c:15
void ConResPuts(FILE *fp, UINT nID)
Definition: fc.c:27
BOOL CompressDrive
Definition: format.c:68
WCHAR LabelString[12]
Definition: format.c:75
static VOID PrintWin32Error(LPWSTR Message, DWORD ErrorCode)
Definition: format.c:117
SIZEDEFINITION LegalSizes[]
Definition: format.c:95
PWCHAR Drive
Definition: format.c:71
static int ParseCommandLine(int argc, WCHAR *argv[])
Definition: format.c:133
BOOL QuickFormat
Definition: format.c:66
BOOL Error
Definition: format.c:63
PWCHAR Label
Definition: format.c:70
BOOL GotALabel
Definition: format.c:69
struct SIZEDEFINITION * PSIZEDEFINITION
BOOLEAN WINAPI FormatExCallback(CALLBACKCOMMAND Command, ULONG Modifier, PVOID Argument)
Definition: format.c:215
WCHAR RootDirectory[MAX_PATH]
Definition: format.c:74
DWORD ClusterSize
Definition: format.c:67
PWCHAR FileSystem
Definition: format.c:72
#define STRING_DRIVE_PARM
Definition: resource.h:11
#define STRING_YN_FORMAT
Definition: resource.h:19
#define STRING_CREATE_FSYS
Definition: resource.h:23
#define STRING_COMPLETE
Definition: resource.h:6
#define STRING_ENTER_LABEL
Definition: resource.h:26
#define STRING_FILESYSTEM
Definition: resource.h:16
#define STRING_LABEL_NAME_EDIT
Definition: resource.h:17
#define STRING_FORMAT_FAIL
Definition: resource.h:7
#define STRING_YES_NO_FAQ
Definition: resource.h:20
#define STRING_INSERT_DISK
Definition: resource.h:13
#define STRING_FMT_COMPLETE
Definition: resource.h:24
#define STRING_NO_VOLUME_SIZE
Definition: resource.h:15
#define STRING_NO_SUPPORT
Definition: resource.h:8
#define STRING_UNKNOW_ARG
Definition: resource.h:10
#define STRING_ERROR_LABEL
Definition: resource.h:18
#define STRING_VERIFYING
Definition: resource.h:21
#define STRING_NO_LABEL
Definition: resource.h:27
#define STRING_FREE_SPACE
Definition: resource.h:28
#define STRING_VOL_COMPRESS
Definition: resource.h:25
#define STRING_NO_VOLUME
Definition: resource.h:14
#define STRING_FMIFS_FAIL
Definition: resource.h:9
#define STRING_SERIAL_NUMBER
Definition: resource.h:29
#define STRING_ERROR_DRIVE_TYPE
Definition: resource.h:12
#define STRING_FAST_FMT
Definition: resource.h:22
wcscat
wcscpy
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
#define wcsicmp
Definition: compat.h:15
BOOLEAN NTAPI EnableVolumeCompression(IN PWCHAR DriveRoot, IN USHORT Compression)
Definition: compress.c:17
VOID NTAPI FormatEx(IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: format.c:39
BOOLEAN NTAPI QueryAvailableFileSystemFormat(IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
Definition: query.c:20
BOOL NTAPI QueryDeviceInformation(_In_ PWCHAR DriveRoot, _Out_ PVOID DeviceInformation, _In_ ULONG BufferSize)
Retrieves disk device information.
Definition: query.c:79
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
Definition: disk.c:342
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
Definition: volume.c:226
BOOL WINAPI SetVolumeLabelW(IN LPCWSTR lpRootPathName, IN LPCWSTR lpVolumeName OPTIONAL)
Definition: volume.c:503
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
#define OUTPUT(ch)
static const WCHAR Message[]
Definition: register.c:74
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FMIFS_MEDIA_FLAG
Definition: fmifs.h:52
@ FMIFS_FLOPPY
Definition: fmifs.h:61
@ FMIFS_HARDDISK
Definition: fmifs.h:65
struct TEXTOUTPUT * PTEXTOUTPUT
CALLBACKCOMMAND
Definition: fmifs.h:81
@ UNKNOWN9
Definition: fmifs.h:91
@ FSNOTSUPPORTED
Definition: fmifs.h:89
@ UNKNOWND
Definition: fmifs.h:95
@ VOLUMEINUSE
Definition: fmifs.h:90
@ UNKNOWN4
Definition: fmifs.h:86
@ UNKNOWNA
Definition: fmifs.h:92
@ STRUCTUREPROGRESS
Definition: fmifs.h:97
@ CLUSTERSIZETOOSMALL
Definition: fmifs.h:98
@ DONEWITHSTRUCTURE
Definition: fmifs.h:83
@ INSUFFICIENTRIGHTS
Definition: fmifs.h:88
@ PROGRESS
Definition: fmifs.h:82
@ UNKNOWN5
Definition: fmifs.h:87
@ UNKNOWN2
Definition: fmifs.h:84
@ UNKNOWN3
Definition: fmifs.h:85
@ UNKNOWNC
Definition: fmifs.h:94
GLenum GLenum GLenum input
Definition: glext.h:9031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
#define stdin
Definition: stdio.h:98
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define DRIVE_CDROM
Definition: machpc98.h:119
__u8 media
Definition: mkdosfs.c:9
static const BYTE serialNumber[]
Definition: msg.c:2848
#define argv
Definition: mplay32.c:18
unsigned int UINT
Definition: ndis.h:50
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
INT ConMsgPuts(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId)
Definition: outstream.c:837
DWORD * PDWORD
Definition: pedump.c:68
int wmain()
#define DONE
Definition: rnr20lib.h:14
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
INT WINAPI K32LoadStringW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT LPWSTR lpBuffer, IN INT nBufferMax)
Definition: utils.c:173
Definition: shell.h:41
DWORD ClusterSize
Definition: format.c:92
PCHAR Output
Definition: fmifs.h:33
ULONG SectorSize
Definition: fmifs.h:40
LARGE_INTEGER SectorCount
Definition: fmifs.h:41
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
Definition: ps.c:97
#define LANG_USER_DEFAULT
Definition: tnerror.cpp:50
#define towlower(c)
Definition: wctype.h:97
unsigned char * PBOOLEAN
Definition: typedefs.h:53
int64_t LONGLONG
Definition: typedefs.h:68
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ WDFCOLLECTION _In_ ULONG Index
#define DRIVE_UNKNOWN
Definition: winbase.h:289
#define DRIVE_NO_ROOT_DIR
Definition: winbase.h:290
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define DRIVE_REMOTE
Definition: winbase.h:286
#define GetModuleHandle
Definition: winbase.h:3868
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:456
#define DRIVE_RAMDISK
Definition: winbase.h:288
#define DRIVE_FIXED
Definition: winbase.h:285
#define DRIVE_REMOVABLE
Definition: winbase.h:284
#define WINAPI
Definition: msvc.h:6
#define ERROR_UNRECOGNIZED_VOLUME
Definition: winerror.h:584
wchar_t * fgetws(wchar_t *buf, int bufsize, FILE *file)
Definition: wmain.c:22
#define STRING_HELP
Definition: xcopy.h:74
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193