ReactOS  0.4.15-dev-1384-g878186b
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 */
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 
155 /* FormatEx2 command in FMIFS */
156 // FIXME!
157 
160  IN DWORD Index,
161  IN OUT PWCHAR FileSystem, /* FIXME: Probably one minimal size is mandatory, but which one? */
162  OUT UCHAR* Major,
163  OUT UCHAR* Minor,
164  OUT BOOLEAN* LatestVersion);
165 
166 BOOL NTAPI
168  IN PWCHAR DriveRoot,
169  OUT ULONG* Buffer, /* That is probably some 4-bytes structure */
170  IN ULONG BufferSize); /* 4 */
171 
172 BOOL NTAPI
174  IN PWCHAR DriveRoot,
175  OUT PWCHAR FileSystem OPTIONAL, /* FIXME: Probably one minimal size is mandatory, but which one? */
176  OUT UCHAR* Unknown2 OPTIONAL, /* Always 0? */
177  OUT UCHAR* Unknown3 OPTIONAL, /* Always 0? */
178  OUT ULONG* Unknown4 OPTIONAL); /* Always 0? */
179 
183  OUT UCHAR* Major OPTIONAL,
185 
186 BOOL NTAPI
188  IN PWCHAR DriveRoot,
189  OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL,
190  IN ULONG Unknown3,
191  OUT PULONG Unknown4); /* Always 1? */
192 
193 BOOL NTAPI
194 SetLabel(
195  IN PWCHAR DriveRoot,
196  IN PWCHAR Label);
197 
198 /* Functions provided by u*.dll */
199 
200 typedef BOOLEAN
202  IN PUNICODE_STRING DriveRoot,
206  IN BOOLEAN CheckOnlyIfDirty,
207  IN BOOLEAN ScanDrive,
208  IN PVOID pUnknown1,
209  IN PVOID pUnknown2,
210  IN PVOID pUnknown3,
211  IN PVOID pUnknown4,
213 
214 // FIXME: PULIB_CHKDSKEX of u*.dll works with ChkdskEx() of FMIFS.DLL
215 
216 typedef BOOLEAN
218  IN PUNICODE_STRING DriveRoot,
221  IN BOOLEAN BackwardCompatible,
222  IN MEDIA_TYPE MediaType,
225 
226 // FIXME: PULIB_FORMATEX of u*.dll works with FormatEx2() of FMIFS.DLL
227 
228 #ifdef __cplusplus
229 }
230 #endif // __cplusplus
231 
232 #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:39
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
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
Definition: fmifs.h:68
Definition: fmifs.h:78
Definition: fmifs.h:73
enum _MEDIA_TYPE MEDIA_TYPE
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:56
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
BOOLEAN(NTAPI * PULIB_FORMAT)(IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN QuickFormat, IN BOOLEAN BackwardCompatible, IN MEDIA_TYPE MediaType, IN PUNICODE_STRING Label, IN ULONG ClusterSize)
Definition: fmifs.h:217
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
_In_ WDFCOLLECTION _In_ ULONG Index
Definition: fmifs.h:79
DWORD ClusterSize
Definition: format.c:67
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char UCHAR
Definition: xmlstorage.h:181
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:456
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
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:859
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN(NTAPI * PULIB_CHKDSK)(IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID pUnknown1, IN PVOID pUnknown2, IN PVOID pUnknown3, IN PVOID pUnknown4, IN PULONG ExitStatus)
Definition: fmifs.h:201
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:40
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
BOOL NTAPI SetLabel(IN PWCHAR DriveRoot, IN PWCHAR Label)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
FMIFS_MEDIA_FLAG
Definition: fmifs.h:37
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68