ReactOS  0.4.14-dev-317-g96040ec
fmifs.h
Go to the documentation of this file.
1 #ifndef _FMIFS_H
2 #define _FMIFS_H
3 /*
4  * fmifs.h
5  *
6  * Copyright (c) 1998 Mark Russinovich
7  * Systems Internals
8  * http://www.sysinternals.com
9  *
10  * Typedefs and definitions for using chkdsk and formatex
11  * functions exported by the fmifs.dll library.
12  *
13  * ---
14  *
15  * 1999-02-18 (Emanuele Aliberti)
16  * Normalized function names.
17  *
18  * ---
19  *
20  * 2006-09-04 (Hervé Poussineau)
21  * Add some prototypes
22  *
23  */
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif // __cplusplus
28 
29 /* Output command */
30 typedef struct
31 {
35 
36 /* media flags */
37 typedef enum
38 {
64 
65 /* Callback command types */
66 typedef enum
67 {
86 
87 /* FMIFS callback definition */
88 typedef BOOLEAN
91  IN ULONG SubAction,
92  IN PVOID ActionInfo);
93 
94 /* Chkdsk command in FMIFS */
95 VOID NTAPI
96 Chkdsk(
97  IN PWCHAR DriveRoot,
99  IN BOOLEAN CorrectErrors,
101  IN BOOLEAN CheckOnlyIfDirty,
102  IN BOOLEAN ScanDrive,
103  IN PVOID Unused2,
104  IN PVOID Unused3,
106 
107 /* ChkdskEx command in FMIFS (not in the original) */
108 VOID NTAPI
109 ChkdskEx(
110  IN PWCHAR DriveRoot,
111  IN PWCHAR Format,
112  IN BOOLEAN CorrectErrors,
114  IN BOOLEAN CheckOnlyIfDirty,
115  IN BOOLEAN ScanDrive,
116  IN PVOID Unused2,
117  IN PVOID Unused3,
119 
122  IN ULONG MediaType);
123 
124 /* DiskCopy command in FMIFS */
125 VOID NTAPI
126 DiskCopy(VOID);
127 
128 /* Enable/Disable volume compression */
131  IN PWCHAR DriveRoot,
132  IN USHORT Compression);
133 
134 /* Format command in FMIFS */
135 VOID NTAPI
136 Format(
137  IN PWCHAR DriveRoot,
138  IN FMIFS_MEDIA_FLAG MediaFlag,
139  IN PWCHAR Format,
140  IN PWCHAR Label,
143 
144 /* FormatEx command in FMIFS */
145 VOID NTAPI
146 FormatEx(
147  IN PWCHAR DriveRoot,
148  IN FMIFS_MEDIA_FLAG MediaFlag,
149  IN PWCHAR Format,
150  IN PWCHAR Label,
154 
157  IN DWORD Index,
158  IN OUT PWCHAR FileSystem, /* FIXME: Probably one minimal size is mandatory, but which one? */
159  OUT UCHAR* Major,
160  OUT UCHAR* Minor,
161  OUT BOOLEAN* LatestVersion);
162 
163 BOOL NTAPI
165  IN PWCHAR DriveRoot,
166  OUT ULONG* Buffer, /* That is probably some 4-bytes structure */
167  IN ULONG BufferSize); /* 4 */
168 
169 BOOL NTAPI
171  IN PWCHAR DriveRoot,
172  OUT PWCHAR FileSystem OPTIONAL, /* FIXME: Probably one minimal size is mandatory, but which one? */
173  OUT UCHAR* Unknown2 OPTIONAL, /* Always 0? */
174  OUT UCHAR* Unknown3 OPTIONAL, /* Always 0? */
175  OUT ULONG* Unknown4 OPTIONAL); /* Always 0? */
176 
180  OUT UCHAR* Major OPTIONAL,
182 
183 BOOL NTAPI
185  IN PWCHAR DriveRoot,
186  OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL,
187  IN ULONG Unknown3,
188  OUT PULONG Unknown4); /* Always 1? */
189 
190 BOOL NTAPI
191 SetLabel(
192  IN PWCHAR DriveRoot,
193  IN PWCHAR Label);
194 
195 /* Functions provided by u*.dll */
196 
197 typedef NTSTATUS
199  IN PUNICODE_STRING DriveRoot,
200  IN FMIFS_MEDIA_FLAG MediaFlag,
205 
206 typedef NTSTATUS
208  IN PUNICODE_STRING DriveRoot,
211  IN BOOLEAN CheckOnlyIfDirty,
212  IN BOOLEAN ScanDrive,
214 
215 #ifdef __cplusplus
216 }
217 #endif // __cplusplus
218 
219 #endif /* ndef _FMIFS_H */
signed char * PCHAR
Definition: retypes.h:7
VOID NTAPI DiskCopy(VOID)
Definition: diskcopy.c:15
_Out_opt_ PULONG Minor
Definition: cmfuncs.h:44
BOOL NTAPI QueryFileSystemName(IN PWCHAR DriveRoot, OUT PWCHAR FileSystem OPTIONAL, OUT UCHAR *Unknown2 OPTIONAL, OUT UCHAR *Unknown3 OPTIONAL, OUT ULONG *Unknown4 OPTIONAL)
#define IN
Definition: typedefs.h:38
Definition: fmifs.h:71
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
Definition: fmifs.h:72
PWCHAR FileSystem
Definition: format.c:72
NTSTATUS(NTAPI * CHKDSKEX)(IN PUNICODE_STRING DriveRoot, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PFMIFSCALLBACK Callback)
Definition: fmifs.h:207
BOOL NTAPI QuerySupportedMedia(IN PWCHAR DriveRoot, OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL, IN ULONG Unknown3, OUT PULONG Unknown4)
Definition: media.c:15
BOOL Verbose
Definition: chkdsk.c:72
Definition: fmifs.h:70
NTSTATUS(NTAPI * FORMATEX)(IN PUNICODE_STRING DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PUNICODE_STRING Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: fmifs.h:198
Definition: fmifs.h:68
Definition: fmifs.h:78
Definition: fmifs.h:73
VOID NTAPI Chkdsk(IN PWCHAR DriveRoot, IN PWCHAR Format, IN BOOLEAN CorrectErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID Unused2, IN PVOID Unused3, IN PFMIFSCALLBACK Callback)
Definition: chkdsk.c:18
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:38
VOID NTAPI Format(IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN PFMIFSCALLBACK Callback)
Definition: format.c:18
uint16_t * PWCHAR
Definition: typedefs.h:54
BOOLEAN NTAPI QueryLatestFileSystemVersion(IN PWCHAR FileSystem, OUT UCHAR *Major OPTIONAL, OUT UCHAR *Minor OPTIONAL)
CALLBACKCOMMAND
Definition: fmifs.h:66
struct TEXTOUTPUT * PTEXTOUTPUT
Definition: fmifs.h:77
Definition: fmifs.h:80
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
unsigned int BOOL
Definition: ntddk_ex.h:94
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
unsigned char BOOLEAN
Definition: bufpool.h:45
PCHAR Output
Definition: fmifs.h:33
BOOL QuickFormat
Definition: format.c:66
FMIFS_MEDIA_FLAG NTAPI ComputeFmMediaType(IN ULONG MediaType)
struct Command Command
Definition: fmifs.h:79
DWORD ClusterSize
Definition: format.c:67
static const UCHAR Index[8]
Definition: usbohci.c:18
#define BufferSize
Definition: classpnp.h:419
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char UCHAR
Definition: xmlstorage.h:181
#define NTSTATUS
Definition: precomp.h:20
BOOLEAN NTAPI EnableVolumeCompression(IN PWCHAR DriveRoot, IN USHORT Compression)
Definition: compress.c:17
BOOLEAN NTAPI QueryAvailableFileSystemFormat(IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
Definition: query.c:14
BOOLEAN(NTAPI * PFMIFSCALLBACK)(IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
Definition: fmifs.h:89
unsigned short USHORT
Definition: pedump.c:61
unsigned int * PULONG
Definition: retypes.h:1
BOOL FixErrors
Definition: chkdsk.c:69
BOOL NTAPI QueryDeviceInformation(IN PWCHAR DriveRoot, OUT ULONG *Buffer, IN ULONG BufferSize)
Definition: fmifs.h:81
#define BOOLEAN
Definition: pedump.c:73
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
PWCHAR Label
Definition: format.c:70
VOID NTAPI ChkdskEx(IN PWCHAR DriveRoot, IN PWCHAR Format, IN BOOLEAN CorrectErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID Unused2, IN PVOID Unused3, IN PFMIFSCALLBACK Callback)
ULONG Lines
Definition: fmifs.h:32
Definition: fmifs.h:82
LPFNPSPCALLBACK Callback
Definition: desk.c:111
BOOL NTAPI SetLabel(IN PWCHAR DriveRoot, IN PWCHAR Label)
FMIFS_MEDIA_FLAG
Definition: fmifs.h:37
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68