4 * Mount point manager interface.
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 #pragma GCC system_header
36 DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID
,
37 0x53f5630d, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
39 #define MOUNTMGRCONTROLTYPE ((ULONG)'m')
40 #define MOUNTDEVCONTROLTYPE ((ULONG)'M')
42 #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
43 #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
45 #define IOCTL_MOUNTMGR_CREATE_POINT \
46 CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
48 #define IOCTL_MOUNTMGR_QUERY_POINTS \
49 CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
51 #define IOCTL_MOUNTMGR_DELETE_POINTS \
52 CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
54 #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY \
55 CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
57 #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER \
58 CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
60 #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS \
61 CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
63 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED \
64 CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
66 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED \
67 CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
69 #define IOCTL_MOUNTMGR_CHANGE_NOTIFY \
70 CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
72 #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE \
73 CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
75 #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES \
76 CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
78 #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION \
79 CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
82 typedef struct _MOUNTDEV_NAME
{
85 } MOUNTDEV_NAME
, *PMOUNTDEV_NAME
;
87 typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO
{
89 } MOUNTMGR_CHANGE_NOTIFY_INFO
, *PMOUNTMGR_CHANGE_NOTIFY_INFO
;
91 typedef struct _MOUNTMGR_CREATE_POINT_INPUT
{
92 USHORT SymbolicLinkNameOffset
;
93 USHORT SymbolicLinkNameLength
;
94 USHORT DeviceNameOffset
;
95 USHORT DeviceNameLength
;
96 } MOUNTMGR_CREATE_POINT_INPUT
, *PMOUNTMGR_CREATE_POINT_INPUT
;
98 typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION
{
99 BOOLEAN DriveLetterWasAssigned
;
100 UCHAR CurrentDriveLetter
;
101 } MOUNTMGR_DRIVE_LETTER_INFORMATION
, *PMOUNTMGR_DRIVE_LETTER_INFORMATION
;
103 typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET
{
104 USHORT DeviceNameLength
;
106 } MOUNTMGR_DRIVE_LETTER_TARGET
, *PMOUNTMGR_DRIVE_LETTER_TARGET
;
108 typedef struct _MOUNTMGR_MOUNT_POINT
{
109 ULONG SymbolicLinkNameOffset
;
110 USHORT SymbolicLinkNameLength
;
111 ULONG UniqueIdOffset
;
112 USHORT UniqueIdLength
;
113 ULONG DeviceNameOffset
;
114 USHORT DeviceNameLength
;
115 } MOUNTMGR_MOUNT_POINT
, *PMOUNTMGR_MOUNT_POINT
;
117 typedef struct _MOUNTMGR_MOUNT_POINTS
{
119 ULONG NumberOfMountPoints
;
120 MOUNTMGR_MOUNT_POINT MountPoints
[1];
121 } MOUNTMGR_MOUNT_POINTS
, *PMOUNTMGR_MOUNT_POINTS
;
123 typedef struct _MOUNTMGR_TARGET_NAME
{
124 USHORT DeviceNameLength
;
126 } MOUNTMGR_TARGET_NAME
, *PMOUNTMGR_TARGET_NAME
;
128 typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT
{
129 USHORT SourceVolumeNameOffset
;
130 USHORT SourceVolumeNameLength
;
131 USHORT TargetVolumeNameOffset
;
132 USHORT TargetVolumeNameLength
;
133 } MOUNTMGR_VOLUME_MOUNT_POINT
, *PMOUNTMGR_VOLUME_MOUNT_POINT
;
139 #endif /* __MOUNTMGR_H */