34#if (NTDDI_VERSION >= NTDDI_WIN2K)
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')
42DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID, 0x53F5630D, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B);
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)
70#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
71 CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
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] == ':')
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] == '}')
145#if (NTDDI_VERSION >= NTDDI_WINXP)
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)
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] == '?')
168#if (NTDDI_VERSION >= NTDDI_WS03)
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)
192#if (NTDDI_VERSION >= NTDDI_WIN7)
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)
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
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
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
MOUNTMGR_MOUNT_POINT MountPoints[1]
ULONG NumberOfMountPoints
USHORT SymbolicLinkNameLength
ULONG SymbolicLinkNameOffset
MOUNTMGR_AUTO_MOUNT_STATE CurrentState
MOUNTMGR_AUTO_MOUNT_STATE NewState
USHORT SourceVolumeNameOffset
USHORT TargetVolumeNameLength
USHORT TargetVolumeNameOffset
USHORT SourceVolumeNameLength
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName