ReactOS 0.4.16-dev-336-gb667d82
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/* Device information */
37typedef struct _DEVICE_INFORMATION
38{
43
44/* Device information flags */
45#define MEMORYSTICK_FORMAT_CAPABLE 0x10
46#define MEMORYSTICK_SUPPORTS_PROGRESS_BAR 0x20
47#define DEVICE_HOTPLUG 0x40
48#define DEVICE_MEMORYSTICK 0x41
49
50/* media flags */
51typedef enum
52{
78
79/* Callback command types */
80typedef enum
81{
100
101/* FMIFS callback definition */
102typedef BOOLEAN
105 IN ULONG SubAction,
106 IN PVOID ActionInfo);
107
108/* Chkdsk command in FMIFS */
110Chkdsk(
111 IN PWCHAR DriveRoot,
113 IN BOOLEAN CorrectErrors,
115 IN BOOLEAN CheckOnlyIfDirty,
116 IN BOOLEAN ScanDrive,
117 IN PVOID Unused2,
118 IN PVOID Unused3,
120
121/* ChkdskEx command in FMIFS */
124 IN PWCHAR DriveRoot,
126 IN BOOLEAN CorrectErrors,
128 IN BOOLEAN CheckOnlyIfDirty,
129 IN BOOLEAN ScanDrive,
130 IN PVOID Unused2,
131 IN PVOID Unused3,
133
136 IN ULONG MediaType);
137
138/* DiskCopy command in FMIFS */
141
142/* Enable/Disable volume compression */
145 IN PWCHAR DriveRoot,
146 IN USHORT Compression);
147
148/* Format command in FMIFS */
150Format(
151 IN PWCHAR DriveRoot,
152 IN FMIFS_MEDIA_FLAG MediaFlag,
157
158/* FormatEx command in FMIFS */
161 IN PWCHAR DriveRoot,
162 IN FMIFS_MEDIA_FLAG MediaFlag,
168
169/* FormatEx2 command in FMIFS */
170// FIXME!
171
174 IN DWORD Index,
175 IN OUT PWCHAR FileSystem, /* FIXME: Probably one minimal size is mandatory, but which one? */
176 OUT UCHAR* Major,
177 OUT UCHAR* Minor,
178 OUT BOOLEAN* LatestVersion);
179
180BOOL
181NTAPI
183 _In_ PWCHAR DriveRoot,
184 _Out_ PVOID DeviceInformation,
186
189 IN PWCHAR DriveRoot,
190 OUT PWCHAR FileSystem OPTIONAL, /* FIXME: Probably one minimal size is mandatory, but which one? */
191 OUT UCHAR* Unknown2 OPTIONAL, /* Always 0? */
192 OUT UCHAR* Unknown3 OPTIONAL, /* Always 0? */
193 OUT ULONG* Unknown4 OPTIONAL); /* Always 0? */
194
198 OUT UCHAR* Major OPTIONAL,
200
203 IN PWCHAR DriveRoot,
204 OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL,
206 OUT PULONG Unknown4); /* Always 1? */
207
210 IN PWCHAR DriveRoot,
211 IN PWCHAR Label);
212
213/* Functions provided by u*.dll */
214
215typedef BOOLEAN
217 IN PUNICODE_STRING DriveRoot,
221 IN BOOLEAN CheckOnlyIfDirty,
222 IN BOOLEAN ScanDrive,
223 IN PVOID pUnknown1,
224 IN PVOID pUnknown2,
225 IN PVOID pUnknown3,
226 IN PVOID pUnknown4,
228
229// FIXME: PULIB_CHKDSKEX of u*.dll works with ChkdskEx() of FMIFS.DLL
230
231typedef BOOLEAN
233 IN PUNICODE_STRING DriveRoot,
236 IN BOOLEAN BackwardCompatible,
237 IN MEDIA_TYPE MediaType,
240
241// FIXME: PULIB_FORMATEX of u*.dll works with FormatEx2() of FMIFS.DLL
242
243#ifdef __cplusplus
244}
245#endif // __cplusplus
246
247#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
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)
struct _DEVICE_INFORMATION DEVICE_INFORMATION
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:19
FMIFS_MEDIA_FLAG
Definition: fmifs.h:52
@ FMIFS_UNKNOWN14
Definition: fmifs.h:67
@ FMIFS_UNKNOWN23
Definition: fmifs.h:76
@ FMIFS_UNKNOWN13
Definition: fmifs.h:66
@ FMIFS_UNKNOWN22
Definition: fmifs.h:75
@ FMIFS_UNKNOWN17
Definition: fmifs.h:70
@ FMIFS_UNKNOWN4
Definition: fmifs.h:57
@ FMIFS_UNKNOWN1
Definition: fmifs.h:54
@ FMIFS_FLOPPY
Definition: fmifs.h:61
@ FMIFS_UNKNOWN3
Definition: fmifs.h:56
@ FMIFS_UNKNOWN10
Definition: fmifs.h:63
@ FMIFS_UNKNOWN18
Definition: fmifs.h:71
@ FMIFS_UNKNOWN0
Definition: fmifs.h:53
@ FMIFS_UNKNOWN21
Definition: fmifs.h:74
@ FMIFS_UNKNOWN15
Definition: fmifs.h:68
@ FMIFS_UNKNOWN16
Definition: fmifs.h:69
@ FMIFS_UNKNOWN7
Definition: fmifs.h:60
@ FMIFS_UNKNOWN20
Definition: fmifs.h:73
@ FMIFS_UNKNOWN19
Definition: fmifs.h:72
@ FMIFS_UNKNOWN6
Definition: fmifs.h:59
@ FMIFS_REMOVABLE
Definition: fmifs.h:64
@ FMIFS_UNKNOWN5
Definition: fmifs.h:58
@ FMIFS_UNKNOWN9
Definition: fmifs.h:62
@ FMIFS_HARDDISK
Definition: fmifs.h:65
@ FMIFS_UNKNOWN2
Definition: fmifs.h:55
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:232
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:81
@ UNKNOWN9
Definition: fmifs.h:91
@ OUTPUT
Definition: fmifs.h:96
@ 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
@ DONE
Definition: fmifs.h:93
@ 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
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
BOOLEAN NTAPI QueryAvailableFileSystemFormat(IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
Definition: query.c:20
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 * 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:216
struct _DEVICE_INFORMATION * PDEVICE_INFORMATION
FMIFS_MEDIA_FLAG NTAPI ComputeFmMediaType(IN ULONG MediaType)
BOOL NTAPI QueryDeviceInformation(_In_ PWCHAR DriveRoot, _Out_ PVOID DeviceInformation, _In_ ULONG BufferSize)
Retrieves disk device information.
Definition: query.c:79
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:103
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:867
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
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
ULONG SectorSize
Definition: fmifs.h:40
ULONG DeviceFlags
Definition: fmifs.h:39
LARGE_INTEGER SectorCount
Definition: fmifs.h:41
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