ReactOS 0.4.16-dev-303-g11d5cb8
mountmgr.h
Go to the documentation of this file.
1/*
2 * mountmgr.h
3 *
4 * Mount Manager driver interface
5 *
6 * This file is part of the ReactOS DDK package.
7 *
8 * Contributors:
9 * Magnus Olsen <greatlord@reactos.org>
10 * Amine Khaldi <amine.khaldi@reactos.org>
11 * Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
12 *
13 * THIS SOFTWARE IS NOT COPYRIGHTED
14 *
15 * This source code is offered for use in the public domain. You may
16 * use, modify or distribute it freely.
17 *
18 * This code is distributed in the hope that it will be useful but
19 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
20 * DISCLAIMED. This includes but is not limited to warranties of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 *
23 */
24
25#ifndef _MOUNTMGR_
26#define _MOUNTMGR_
27
28#pragma once
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#if (NTDDI_VERSION >= NTDDI_WIN2K)
35
36#define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
37#define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
38#define MOUNTMGRCONTROLTYPE ((ULONG)'m')
39#define MOUNTDEVCONTROLTYPE ((ULONG)'M')
40
41#ifdef DEFINE_GUID
42DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID, 0x53F5630D, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B);
43#endif
44
45#define IOCTL_MOUNTMGR_CREATE_POINT \
46 CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
47#define IOCTL_MOUNTMGR_DELETE_POINTS \
48 CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
49#define IOCTL_MOUNTMGR_QUERY_POINTS \
50 CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
51#define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY \
52 CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
53#define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER \
54 CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
55#define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS \
56 CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
57#define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED \
58 CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
59#define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED \
60 CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
61#define IOCTL_MOUNTMGR_CHANGE_NOTIFY \
62 CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
63#define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE \
64 CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
65#define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES \
66 CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
67#define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION \
68 CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
69
70#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
71 CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
72
73#define MOUNTMGR_IS_DRIVE_LETTER(s) \
74 ((s)->Length == 28 && (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && \
75 (s)->Buffer[2] == 'o' && (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && \
76 (s)->Buffer[5] == 'e' && (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && \
77 (s)->Buffer[8] == 'c' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && \
78 (s)->Buffer[11] == '\\' && (s)->Buffer[12] >= 'A' && \
79 (s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
80
81#define MOUNTMGR_IS_VOLUME_NAME(s) \
82 (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
83 (s)->Buffer[0] == '\\'&& ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
84 (s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
85 (s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
86 (s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
87 (s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
88 (s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
89
90typedef struct _MOUNTMGR_CREATE_POINT_INPUT {
96
97typedef struct _MOUNTMGR_MOUNT_POINT {
105
106typedef struct _MOUNTMGR_MOUNT_POINTS {
107 ULONG Size;
111
116
121
128
132
133typedef struct _MOUNTMGR_TARGET_NAME {
135 WCHAR DeviceName[1];
137
138typedef struct _MOUNTDEV_NAME {
140 WCHAR Name[1];
142
143#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
144
145#if (NTDDI_VERSION >= NTDDI_WINXP)
146
147#define IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH \
148 CTL_CODE(MOUNTMGRCONTROLTYPE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
149#define IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATHS \
150 CTL_CODE(MOUNTMGRCONTROLTYPE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
151
152#define MOUNTMGR_IS_DOS_VOLUME_NAME(s) \
153 (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '\\')
154#define MOUNTMGR_IS_DOS_VOLUME_NAME_WB(s) \
155 (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '\\')
156#define MOUNTMGR_IS_NT_VOLUME_NAME(s) \
157 ( MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 96 && (s)->Buffer[1] == '?')
158#define MOUNTMGR_IS_NT_VOLUME_NAME_WB(s) \
159 (MOUNTMGR_IS_VOLUME_NAME(s) && (s)->Length == 98 && (s)->Buffer[1] == '?')
160
165
166#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
167
168#if (NTDDI_VERSION >= NTDDI_WS03)
169
170#define IOCTL_MOUNTMGR_SCRUB_REGISTRY \
171 CTL_CODE(MOUNTMGRCONTROLTYPE, 14, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
172#define IOCTL_MOUNTMGR_QUERY_AUTO_MOUNT \
173 CTL_CODE(MOUNTMGRCONTROLTYPE, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
174#define IOCTL_MOUNTMGR_SET_AUTO_MOUNT \
175 CTL_CODE(MOUNTMGRCONTROLTYPE, 16, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
176
179 Enabled
181
185
189
190#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
191
192#if (NTDDI_VERSION >= NTDDI_WIN7)
193
194#define IOCTL_MOUNTMGR_BOOT_DL_ASSIGNMENT \
195 CTL_CODE(MOUNTMGRCONTROLTYPE, 17, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
196#define IOCTL_MOUNTMGR_TRACELOG_CACHE \
197 CTL_CODE(MOUNTMGRCONTROLTYPE, 18, METHOD_BUFFERED, FILE_READ_ACCESS)
198
199#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
200
201#ifdef __cplusplus
202} /* extern "C" */
203#endif
204
205#endif /* _MOUNTMGR_ */
unsigned char BOOLEAN
struct _MOUNTDEV_NAME MOUNTDEV_NAME
struct _MOUNTMGR_MOUNT_POINT * PMOUNTMGR_MOUNT_POINT
struct _MOUNTMGR_CHANGE_NOTIFY_INFO * PMOUNTMGR_CHANGE_NOTIFY_INFO
struct _MOUNTMGR_SET_AUTO_MOUNT MOUNTMGR_SET_AUTO_MOUNT
_MOUNTMGR_AUTO_MOUNT_STATE
Definition: mountmgr.h:177
@ Enabled
Definition: mountmgr.h:179
@ Disabled
Definition: mountmgr.h:178
struct _MOUNTMGR_MOUNT_POINTS * PMOUNTMGR_MOUNT_POINTS
struct _MOUNTMGR_QUERY_AUTO_MOUNT * PMOUNTMGR_QUERY_AUTO_MOUNT
struct _MOUNTMGR_VOLUME_PATHS * PMOUNTMGR_VOLUME_PATHS
struct _MOUNTMGR_CREATE_POINT_INPUT MOUNTMGR_CREATE_POINT_INPUT
struct _MOUNTMGR_VOLUME_MOUNT_POINT * PMOUNTMGR_VOLUME_MOUNT_POINT
struct _MOUNTMGR_DRIVE_LETTER_INFORMATION * PMOUNTMGR_DRIVE_LETTER_INFORMATION
struct _MOUNTDEV_NAME * PMOUNTDEV_NAME
struct _MOUNTMGR_SET_AUTO_MOUNT * PMOUNTMGR_SET_AUTO_MOUNT
enum _MOUNTMGR_AUTO_MOUNT_STATE MOUNTMGR_AUTO_MOUNT_STATE
struct _MOUNTMGR_DRIVE_LETTER_TARGET MOUNTMGR_DRIVE_LETTER_TARGET
struct _MOUNTMGR_TARGET_NAME * PMOUNTMGR_TARGET_NAME
struct _MOUNTMGR_TARGET_NAME MOUNTMGR_TARGET_NAME
struct _MOUNTMGR_DRIVE_LETTER_TARGET * PMOUNTMGR_DRIVE_LETTER_TARGET
struct _MOUNTMGR_MOUNT_POINT MOUNTMGR_MOUNT_POINT
struct _MOUNTMGR_DRIVE_LETTER_INFORMATION MOUNTMGR_DRIVE_LETTER_INFORMATION
struct _MOUNTMGR_QUERY_AUTO_MOUNT MOUNTMGR_QUERY_AUTO_MOUNT
struct _MOUNTMGR_MOUNT_POINTS MOUNTMGR_MOUNT_POINTS
struct _MOUNTMGR_CREATE_POINT_INPUT * PMOUNTMGR_CREATE_POINT_INPUT
struct _MOUNTMGR_VOLUME_MOUNT_POINT MOUNTMGR_VOLUME_MOUNT_POINT
struct _MOUNTMGR_VOLUME_PATHS MOUNTMGR_VOLUME_PATHS
struct _MOUNTMGR_CHANGE_NOTIFY_INFO MOUNTMGR_CHANGE_NOTIFY_INFO
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
USHORT NameLength
Definition: imports.h:141
MOUNTMGR_MOUNT_POINT MountPoints[1]
Definition: imports.h:175
USHORT DeviceNameLength
Definition: imports.h:169
USHORT SymbolicLinkNameLength
Definition: imports.h:165
ULONG SymbolicLinkNameOffset
Definition: imports.h:164
MOUNTMGR_AUTO_MOUNT_STATE CurrentState
Definition: mountmgr.h:183
MOUNTMGR_AUTO_MOUNT_STATE NewState
Definition: mountmgr.h:187
USHORT DeviceNameLength
Definition: imports.h:152
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180