ReactOS 0.4.15-dev-7918-g2a2556c
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
26extern "C" {
27#endif // __cplusplus
28
29/* Output command */
30typedef struct
31{
35
36/* media flags */
37typedef enum
38{
64
65/* Callback command types */
66typedef enum
67{
86
87/* FMIFS callback definition */
88typedef BOOLEAN
91 IN ULONG SubAction,
92 IN PVOID ActionInfo);
93
94/* Chkdsk command in FMIFS */
96Chkdsk(
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 */
110 IN PWCHAR DriveRoot,
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 */
127
128/* Enable/Disable volume compression */
131 IN PWCHAR DriveRoot,
132 IN USHORT Compression);
133
134/* Format command in FMIFS */
136Format(
137 IN PWCHAR DriveRoot,
138 IN FMIFS_MEDIA_FLAG MediaFlag,
143
144/* FormatEx command in FMIFS */
147 IN PWCHAR DriveRoot,
148 IN FMIFS_MEDIA_FLAG MediaFlag,
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
168 IN PWCHAR DriveRoot,
169 OUT ULONG* Buffer, /* That is probably some 4-bytes structure */
170 IN ULONG BufferSize); /* 4 */
171
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
188 IN PWCHAR DriveRoot,
189 OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL,
191 OUT PULONG Unknown4); /* Always 1? */
192
195 IN PWCHAR DriveRoot,
196 IN PWCHAR Label);
197
198/* Functions provided by u*.dll */
199
200typedef 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
216typedef 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 */
unsigned char BOOLEAN
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
BOOL FixErrors
Definition: chkdsk.c:69
BOOL Verbose
Definition: chkdsk.c:72
BOOL QuickFormat
Definition: format.c:66
PWCHAR Label
Definition: format.c:70
DWORD ClusterSize
Definition: format.c:67
PWCHAR FileSystem
Definition: format.c:72
Definition: bufpool.h:45
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
VOID NTAPI DiskCopy(void)
Definition: diskcopy.c:15
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOLEAN NTAPI QueryLatestFileSystemVersion(IN PWCHAR FileSystem, OUT UCHAR *Major OPTIONAL, OUT UCHAR *Minor OPTIONAL)
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
FMIFS_MEDIA_FLAG
Definition: fmifs.h:38
@ FMIFS_UNKNOWN14
Definition: fmifs.h:53
@ FMIFS_UNKNOWN23
Definition: fmifs.h:62
@ FMIFS_UNKNOWN13
Definition: fmifs.h:52
@ FMIFS_UNKNOWN22
Definition: fmifs.h:61
@ FMIFS_UNKNOWN17
Definition: fmifs.h:56
@ FMIFS_UNKNOWN4
Definition: fmifs.h:43
@ FMIFS_UNKNOWN1
Definition: fmifs.h:40
@ FMIFS_FLOPPY
Definition: fmifs.h:47
@ FMIFS_UNKNOWN3
Definition: fmifs.h:42
@ FMIFS_UNKNOWN10
Definition: fmifs.h:49
@ FMIFS_UNKNOWN18
Definition: fmifs.h:57
@ FMIFS_UNKNOWN0
Definition: fmifs.h:39
@ FMIFS_UNKNOWN21
Definition: fmifs.h:60
@ FMIFS_UNKNOWN15
Definition: fmifs.h:54
@ FMIFS_UNKNOWN16
Definition: fmifs.h:55
@ FMIFS_UNKNOWN7
Definition: fmifs.h:46
@ FMIFS_UNKNOWN20
Definition: fmifs.h:59
@ FMIFS_UNKNOWN19
Definition: fmifs.h:58
@ FMIFS_UNKNOWN6
Definition: fmifs.h:45
@ FMIFS_REMOVABLE
Definition: fmifs.h:50
@ FMIFS_UNKNOWN5
Definition: fmifs.h:44
@ FMIFS_UNKNOWN9
Definition: fmifs.h:48
@ FMIFS_HARDDISK
Definition: fmifs.h:51
@ FMIFS_UNKNOWN2
Definition: fmifs.h:41
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
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)
struct TEXTOUTPUT * PTEXTOUTPUT
CALLBACKCOMMAND
Definition: fmifs.h:67
@ UNKNOWN9
Definition: fmifs.h:77
@ OUTPUT
Definition: fmifs.h:82
@ FSNOTSUPPORTED
Definition: fmifs.h:75
@ UNKNOWND
Definition: fmifs.h:81
@ VOLUMEINUSE
Definition: fmifs.h:76
@ UNKNOWN4
Definition: fmifs.h:72
@ UNKNOWNA
Definition: fmifs.h:78
@ STRUCTUREPROGRESS
Definition: fmifs.h:83
@ DONE
Definition: fmifs.h:79
@ CLUSTERSIZETOOSMALL
Definition: fmifs.h:84
@ DONEWITHSTRUCTURE
Definition: fmifs.h:69
@ INSUFFICIENTRIGHTS
Definition: fmifs.h:74
@ PROGRESS
Definition: fmifs.h:68
@ UNKNOWN5
Definition: fmifs.h:73
@ UNKNOWN2
Definition: fmifs.h:70
@ UNKNOWN3
Definition: fmifs.h:71
@ UNKNOWNC
Definition: fmifs.h:80
BOOL NTAPI SetLabel(IN PWCHAR DriveRoot, IN PWCHAR Label)
BOOL NTAPI QuerySupportedMedia(IN PWCHAR DriveRoot, OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL, IN ULONG Unknown3, OUT PULONG Unknown4)
Definition: media.c:15
BOOL NTAPI QueryDeviceInformation(IN PWCHAR DriveRoot, OUT ULONG *Buffer, IN ULONG BufferSize)
BOOLEAN NTAPI QueryAvailableFileSystemFormat(IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
Definition: query.c:14
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
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
FMIFS_MEDIA_FLAG NTAPI ComputeFmMediaType(IN ULONG MediaType)
BOOL NTAPI QueryFileSystemName(IN PWCHAR DriveRoot, OUT PWCHAR FileSystem OPTIONAL, OUT UCHAR *Unknown2 OPTIONAL, OUT UCHAR *Unknown3 OPTIONAL, OUT ULONG *Unknown4 OPTIONAL)
BOOLEAN NTAPI EnableVolumeCompression(IN PWCHAR DriveRoot, IN USHORT Compression)
Definition: compress.c:17
BOOLEAN(NTAPI * PFMIFSCALLBACK)(IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
Definition: fmifs.h:89
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:867
enum _MEDIA_TYPE MEDIA_TYPE
#define BOOLEAN
Definition: pedump.c:73
unsigned short USHORT
Definition: pedump.c:61
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: shell.h:41
ULONG Lines
Definition: fmifs.h:32
PCHAR Output
Definition: fmifs.h:33
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Out_opt_ PULONG Minor
Definition: cmfuncs.h:44
unsigned char UCHAR
Definition: xmlstorage.h:181