1 | /*
|
---|
2 | * mountmgr.h
|
---|
3 | *
|
---|
4 | * Mount point manager interface.
|
---|
5 | *
|
---|
6 | * This file is part of the w32api package.
|
---|
7 | *
|
---|
8 | * Contributors:
|
---|
9 | * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
---|
10 | *
|
---|
11 | * THIS SOFTWARE IS NOT COPYRIGHTED
|
---|
12 | *
|
---|
13 | * This source code is offered for use in the public domain. You may
|
---|
14 | * use, modify or distribute it freely.
|
---|
15 | *
|
---|
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.
|
---|
20 | *
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef __MOUNTMGR_H
|
---|
24 | #define __MOUNTMGR_H
|
---|
25 |
|
---|
26 | #if __GNUC__ >=3
|
---|
27 | #pragma GCC system_header
|
---|
28 | #endif
|
---|
29 |
|
---|
30 | #ifdef __cplusplus
|
---|
31 | extern "C" {
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #include "ntddk.h"
|
---|
35 |
|
---|
36 | DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID,
|
---|
37 | 0x53f5630d, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
---|
38 |
|
---|
39 | #define MOUNTMGRCONTROLTYPE ((ULONG)'m')
|
---|
40 | #define MOUNTDEVCONTROLTYPE ((ULONG)'M')
|
---|
41 |
|
---|
42 | #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
|
---|
43 | #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
|
---|
44 |
|
---|
45 | #define IOCTL_MOUNTMGR_CREATE_POINT \
|
---|
46 | CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
47 |
|
---|
48 | #define IOCTL_MOUNTMGR_QUERY_POINTS \
|
---|
49 | CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
50 |
|
---|
51 | #define IOCTL_MOUNTMGR_DELETE_POINTS \
|
---|
52 | CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
53 |
|
---|
54 | #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY \
|
---|
55 | CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
56 |
|
---|
57 | #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER \
|
---|
58 | CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
59 |
|
---|
60 | #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS \
|
---|
61 | CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
62 |
|
---|
63 | #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED \
|
---|
64 | CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
65 |
|
---|
66 | #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED \
|
---|
67 | CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
68 |
|
---|
69 | #define IOCTL_MOUNTMGR_CHANGE_NOTIFY \
|
---|
70 | CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
71 |
|
---|
72 | #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE \
|
---|
73 | CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
74 |
|
---|
75 | #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES \
|
---|
76 | CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
77 |
|
---|
78 | #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION \
|
---|
79 | CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
80 |
|
---|
81 |
|
---|
82 | typedef struct _MOUNTDEV_NAME {
|
---|
83 | USHORT NameLength;
|
---|
84 | WCHAR Name[1];
|
---|
85 | } MOUNTDEV_NAME, *PMOUNTDEV_NAME;
|
---|
86 |
|
---|
87 | typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO {
|
---|
88 | ULONG EpicNumber;
|
---|
89 | } MOUNTMGR_CHANGE_NOTIFY_INFO, *PMOUNTMGR_CHANGE_NOTIFY_INFO;
|
---|
90 |
|
---|
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;
|
---|
97 |
|
---|
98 | typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION {
|
---|
99 | BOOLEAN DriveLetterWasAssigned;
|
---|
100 | UCHAR CurrentDriveLetter;
|
---|
101 | } MOUNTMGR_DRIVE_LETTER_INFORMATION, *PMOUNTMGR_DRIVE_LETTER_INFORMATION;
|
---|
102 |
|
---|
103 | typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET {
|
---|
104 | USHORT DeviceNameLength;
|
---|
105 | WCHAR DeviceName[1];
|
---|
106 | } MOUNTMGR_DRIVE_LETTER_TARGET, *PMOUNTMGR_DRIVE_LETTER_TARGET;
|
---|
107 |
|
---|
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;
|
---|
116 |
|
---|
117 | typedef struct _MOUNTMGR_MOUNT_POINTS {
|
---|
118 | ULONG Size;
|
---|
119 | ULONG NumberOfMountPoints;
|
---|
120 | MOUNTMGR_MOUNT_POINT MountPoints[1];
|
---|
121 | } MOUNTMGR_MOUNT_POINTS, *PMOUNTMGR_MOUNT_POINTS;
|
---|
122 |
|
---|
123 | typedef struct _MOUNTMGR_TARGET_NAME {
|
---|
124 | USHORT DeviceNameLength;
|
---|
125 | WCHAR DeviceName[1];
|
---|
126 | } MOUNTMGR_TARGET_NAME, *PMOUNTMGR_TARGET_NAME;
|
---|
127 |
|
---|
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;
|
---|
134 |
|
---|
135 | #ifdef __cplusplus
|
---|
136 | }
|
---|
137 | #endif
|
---|
138 |
|
---|
139 | #endif /* __MOUNTMGR_H */
|
---|