msvcrt: Fix testing zero-valued expression with bitwise and in find_best_locale_proc.
[wine/wine64.git] / include / ddk / mountmgr.h
blobdb0f21c71260313da6e4cd72a396df05b14d9886
1 /*
2 * Mount point manager definitions
4 * Copyright 2007 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef _MOUNTMGR_
22 #define _MOUNTMGR_
24 #define MOUNTMGRCONTROLTYPE ((ULONG)'m')
25 #define MOUNTDEVCONTROLTYPE ((ULONG)'M')
27 #if defined(__GNUC__)
28 #define MOUNTMGR_DEVICE_NAME (const WCHAR []){'\\','D','e','v','i','c','e','\\','M','o','u','n','t','P','o','i','n','t','M','a','n','a','g','e','r',0}
29 #define MOUNTMGR_DOS_DEVICE_NAME (const WCHAR []){'\\','\\','.','\\','M','o','u','n','t','P','o','i','n','t','M','a','n','a','g','e','r',0}
30 #elif defined(_MSC_VER)
31 #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
32 #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
33 #else
34 static const WCHAR MOUNTMGR_DEVICE_NAME[] = {'\\','D','e','v','i','c','e','\\','M','o','u','n','t','P','o','i','n','t','M','a','n','a','g','e','r',0};
35 static const WCHAR MOUNTMGR_DOS_DEVICE_NAME[] = {'\\','\\','.','\\','M','o','u','n','t','P','o','i','n','t','M','a','n','a','g','e','r',0};
36 #endif
39 #define IOCTL_MOUNTMGR_CREATE_POINT CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
40 #define IOCTL_MOUNTMGR_DELETE_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
41 #define IOCTL_MOUNTMGR_QUERY_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
42 #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
43 #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
44 #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
45 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
46 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
47 #define IOCTL_MOUNTMGR_CHANGE_NOTIFY CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
48 #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
49 #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
50 #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
52 typedef struct _MOUNTMGR_CREATE_POINT_INPUT
54 USHORT SymbolicLinkNameOffset;
55 USHORT SymbolicLinkNameLength;
56 USHORT DeviceNameOffset;
57 USHORT DeviceNameLength;
58 } MOUNTMGR_CREATE_POINT_INPUT, *PMOUNTMGR_CREATE_POINT_INPUT;
60 typedef struct _MOUNTMGR_MOUNT_POINT
62 ULONG SymbolicLinkNameOffset;
63 USHORT SymbolicLinkNameLength;
64 ULONG UniqueIdOffset;
65 USHORT UniqueIdLength;
66 ULONG DeviceNameOffset;
67 USHORT DeviceNameLength;
68 } MOUNTMGR_MOUNT_POINT, *PMOUNTMGR_MOUNT_POINT;
70 typedef struct _MOUNTMGR_MOUNT_POINTS
72 ULONG Size;
73 ULONG NumberOfMountPoints;
74 MOUNTMGR_MOUNT_POINT MountPoints[1];
75 } MOUNTMGR_MOUNT_POINTS, *PMOUNTMGR_MOUNT_POINTS;
77 typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET
79 USHORT DeviceNameLength;
80 WCHAR DeviceName[1];
81 } MOUNTMGR_DRIVE_LETTER_TARGET, *PMOUNTMGR_DRIVE_LETTER_TARGET;
83 typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION
85 BOOLEAN DriveLetterWasAssigned;
86 UCHAR CurrentDriveLetter;
87 } MOUNTMGR_DRIVE_LETTER_INFORMATION, *PMOUNTMGR_DRIVE_LETTER_INFORMATION;
89 typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT
91 USHORT SourceVolumeNameOffset;
92 USHORT SourceVolumeNameLength;
93 USHORT TargetVolumeNameOffset;
94 USHORT TargetVolumeNameLength;
95 } MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
97 typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO
99 ULONG EpicNumber;
100 } MOUNTMGR_CHANGE_NOTIFY_INFO, *PMOUNTMGR_CHANGE_NOTIFY_INFO;
102 typedef struct _MOUNTMGR_TARGET_NAME
104 USHORT DeviceNameLength;
105 WCHAR DeviceName[1];
106 } MOUNTMGR_TARGET_NAME, *PMOUNTMGR_TARGET_NAME;
108 #define MOUNTMGR_IS_DRIVE_LETTER(s) \
109 ((s)->Length == 28 && \
110 (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && (s)->Buffer[2] == 'o' && \
111 (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && (s)->Buffer[5] == 'e' && \
112 (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && (s)->Buffer[8] == 'c' && \
113 (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && (s)->Buffer[11] == '\\' && \
114 (s)->Buffer[12] >= 'A' && (s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
116 #define MOUNTMGR_IS_VOLUME_NAME(s) \
117 (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
118 (s)->Buffer[0] == '\\' && ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
119 (s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
120 (s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
121 (s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
122 (s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
123 (s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
125 #endif /* _MOUNTMGR_ */