ReactOS  0.4.14-dev-114-gc8cbd56
mountmgr.h
Go to the documentation of this file.
1 #ifndef _MOUNTMGR_
2 #define _MOUNTMGR_
3 
4 #if (NTDDI_VERSION >= NTDDI_WIN2K)
5 
6 #if defined(DEFINE_GUID)
7 DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID, 0x53F5630D, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B);
8 #endif
9 
10 #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
11 #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
12 #define MOUNTMGRCONTROLTYPE ((ULONG) 'm')
13 #define MOUNTDEVCONTROLTYPE ((ULONG) 'M')
14 
15 #define IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 32, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
16 #define IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 33, METHOD_BUFFERED, FILE_READ_ACCESS)
17 
24 };
25 
26 #define IOCTL_MOUNTMGR_CREATE_POINT \
27  CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
28 #define IOCTL_MOUNTMGR_DELETE_POINTS \
29  CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
30 #define IOCTL_MOUNTMGR_QUERY_POINTS \
31  CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
32 #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY \
33  CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
34 #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER \
35  CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
36 #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS \
37  CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
38 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED \
39  CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
40 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED \
41  CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
42 #define IOCTL_MOUNTMGR_CHANGE_NOTIFY \
43  CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
44 #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE \
45  CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
46 #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES \
47  CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
48 #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION \
49  CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
50 #define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
51  CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
52 
53 #define MOUNTMGR_IS_DRIVE_LETTER(s) \
54  ((s)->Length == 28 && (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && \
55  (s)->Buffer[2] == 'o' && (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && \
56  (s)->Buffer[5] == 'e' && (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && \
57  (s)->Buffer[8] == 'c' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && \
58  (s)->Buffer[11] == '\\' && (s)->Buffer[12] >= 'A' && \
59  (s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
60 
61 #define MOUNTMGR_IS_VOLUME_NAME(s) \
62  (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
63  (s)->Buffer[0] == '\\'&& ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
64  (s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
65  (s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
66  (s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
67  (s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
68  (s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
69 
70 typedef struct _MOUNTMGR_CREATE_POINT_INPUT {
76 
77 typedef struct _MOUNTMGR_MOUNT_POINT {
85 
86 typedef struct _MOUNTMGR_MOUNT_POINTS {
87  ULONG Size;
91 
96 
101 
108 
112 
113 typedef struct _MOUNTMGR_TARGET_NAME {
115  WCHAR DeviceName[1];
117 
118 typedef struct _MOUNTDEV_NAME {
120  WCHAR Name[1];
122 
123 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
124 
125 #if (NTDDI_VERSION >= NTDDI_WINXP)
126 
127 #define IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH \
128  CTL_CODE(MOUNTMGRCONTROLTYPE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
129 #define IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATHS \
130  CTL_CODE(MOUNTMGRCONTROLTYPE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
131 
132 #define MOUNTMGR_IS_DOS_VOLUME_NAME(s) \
133  (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '\\')
134 #define MOUNTMGR_IS_DOS_VOLUME_NAME_WB(s) \
135  (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '\\')
136 #define MOUNTMGR_IS_NT_VOLUME_NAME(s) \
137  ( MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '?')
138 #define MOUNTMGR_IS_NT_VOLUME_NAME_WB(s) \
139  (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '?')
140 
141 typedef struct _MOUNTMGR_VOLUME_PATHS {
145 
146 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
147 
148 #if (NTDDI_VERSION >= NTDDI_WS03)
149 
150 #define IOCTL_MOUNTMGR_SCRUB_REGISTRY \
151  CTL_CODE(MOUNTMGRCONTROLTYPE, 14, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
152 #define IOCTL_MOUNTMGR_QUERY_AUTO_MOUNT \
153  CTL_CODE(MOUNTMGRCONTROLTYPE, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
154 #define IOCTL_MOUNTMGR_SET_AUTO_MOUNT \
155  CTL_CODE(MOUNTMGRCONTROLTYPE, 16, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
156 
158  Disabled = 0,
161 
165 
166 typedef struct _MOUNTMGR_SET_AUTO_MOUNT {
169 
170 #endif /* (NTDDI_VERSION >= NTDDI_WS03) */
171 
172 #if (NTDDI_VERSION >= NTDDI_WIN7)
173 
174 #define IOCTL_MOUNTMGR_BOOT_DL_ASSIGNMENT \
175  CTL_CODE(MOUNTMGRCONTROLTYPE, 17, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
176 #define IOCTL_MOUNTMGR_TRACELOG_CACHE \
177  CTL_CODE(MOUNTMGRCONTROLTYPE, 18, METHOD_BUFFERED, FILE_READ_ACCESS)
178 
179 #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
180 
181 #endif /* _MOUNTMGR_ */
182 
struct _MOUNTMGR_MOUNT_POINT * PMOUNTMGR_MOUNT_POINT
struct _MOUNTMGR_VOLUME_MOUNT_POINT * PMOUNTMGR_VOLUME_MOUNT_POINT
WCHAR DeviceName[1]
Definition: imports.h:155
struct _MOUNTMGR_DRIVE_LETTER_INFORMATION * PMOUNTMGR_DRIVE_LETTER_INFORMATION
struct _MOUNTMGR_QUERY_AUTO_MOUNT MOUNTMGR_QUERY_AUTO_MOUNT
struct _MOUNTMGR_SET_AUTO_MOUNT MOUNTMGR_SET_AUTO_MOUNT
struct _MOUNTMGR_TARGET_NAME * PMOUNTMGR_TARGET_NAME
struct _MOUNTDEV_NAME MOUNTDEV_NAME
struct _MOUNTMGR_DRIVE_LETTER_INFORMATION MOUNTMGR_DRIVE_LETTER_INFORMATION
struct _MOUNTMGR_VOLUME_MOUNT_POINT MOUNTMGR_VOLUME_MOUNT_POINT
struct _MOUNTDEV_NAME * PMOUNTDEV_NAME
MOUNTMGR_AUTO_MOUNT_STATE NewState
Definition: mountmgr.h:167
struct _MOUNTMGR_MOUNT_POINTS * PMOUNTMGR_MOUNT_POINTS
USHORT mount_point_offset
Definition: mountmgr.h:22
unsigned char BOOLEAN
_MOUNTMGR_AUTO_MOUNT_STATE
Definition: mountmgr.h:157
struct _MOUNTMGR_TARGET_NAME MOUNTMGR_TARGET_NAME
USHORT DeviceNameLength
Definition: imports.h:171
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
struct _MOUNTMGR_SET_AUTO_MOUNT * PMOUNTMGR_SET_AUTO_MOUNT
__wchar_t WCHAR
Definition: xmlstorage.h:180
struct _MOUNTMGR_QUERY_AUTO_MOUNT * PMOUNTMGR_QUERY_AUTO_MOUNT
struct _MOUNTMGR_VOLUME_PATHS * PMOUNTMGR_VOLUME_PATHS
struct _MOUNTMGR_DRIVE_LETTER_TARGET MOUNTMGR_DRIVE_LETTER_TARGET
struct _MOUNTMGR_CHANGE_NOTIFY_INFO MOUNTMGR_CHANGE_NOTIFY_INFO
unsigned char UCHAR
Definition: xmlstorage.h:181
MOUNTMGR_AUTO_MOUNT_STATE CurrentState
Definition: mountmgr.h:163
enum _MOUNTMGR_AUTO_MOUNT_STATE MOUNTMGR_AUTO_MOUNT_STATE
MOUNTMGR_MOUNT_POINT MountPoints[1]
Definition: imports.h:177
USHORT DeviceNameLength
Definition: imports.h:154
unsigned short USHORT
Definition: pedump.c:61
struct _MOUNTMGR_CREATE_POINT_INPUT * PMOUNTMGR_CREATE_POINT_INPUT
USHORT NameLength
Definition: imports.h:143
struct _MOUNTMGR_MOUNT_POINT MOUNTMGR_MOUNT_POINT
struct _MOUNTMGR_VOLUME_PATHS MOUNTMGR_VOLUME_PATHS
struct _MOUNTMGR_DRIVE_LETTER_TARGET * PMOUNTMGR_DRIVE_LETTER_TARGET
ULONG SymbolicLinkNameOffset
Definition: imports.h:166
unsigned int ULONG
Definition: retypes.h:1
USHORT SymbolicLinkNameLength
Definition: imports.h:167
USHORT device_offset
Definition: mountmgr.h:23
struct _MOUNTMGR_CREATE_POINT_INPUT MOUNTMGR_CREATE_POINT_INPUT
struct _MOUNTMGR_MOUNT_POINTS MOUNTMGR_MOUNT_POINTS
struct _MOUNTMGR_CHANGE_NOTIFY_INFO * PMOUNTMGR_CHANGE_NOTIFY_INFO