winemac.drv: Don't filter non active displays out.
[wine/zf.git] / include / ddk / mountmgr.h
blob3e4bacbb8278b7a86dfa6aed0de5899075e7f05e
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(_MSC_VER) || defined(__MINGW32__)
28 #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
29 #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
30 #else
31 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};
32 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};
33 #endif
36 #define IOCTL_MOUNTMGR_CREATE_POINT CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
37 #define IOCTL_MOUNTMGR_DELETE_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
38 #define IOCTL_MOUNTMGR_QUERY_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
39 #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
40 #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
41 #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
42 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
43 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
44 #define IOCTL_MOUNTMGR_CHANGE_NOTIFY CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
45 #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
46 #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
47 #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
49 /* Wine extensions */
50 #ifdef WINE_MOUNTMGR_EXTENSIONS
52 #define IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 32, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
53 #define IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 33, METHOD_BUFFERED, FILE_READ_ACCESS)
55 enum mountmgr_fs_type
57 MOUNTMGR_FS_TYPE_NTFS,
58 MOUNTMGR_FS_TYPE_FAT,
59 MOUNTMGR_FS_TYPE_FAT32,
60 MOUNTMGR_FS_TYPE_ISO9660,
61 MOUNTMGR_FS_TYPE_UDF,
64 struct mountmgr_unix_drive
66 ULONG size;
67 ULONG type;
68 ULONG fs_type;
69 DWORD serial;
70 ULONGLONG unix_dev;
71 WCHAR letter;
72 USHORT mount_point_offset;
73 USHORT device_offset;
74 USHORT label_offset;
77 #define IOCTL_MOUNTMGR_READ_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 48, METHOD_BUFFERED, FILE_READ_ACCESS)
78 #define IOCTL_MOUNTMGR_WRITE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 49, METHOD_BUFFERED, FILE_WRITE_ACCESS)
79 #define IOCTL_MOUNTMGR_DELETE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 50, METHOD_BUFFERED, FILE_WRITE_ACCESS)
80 #define IOCTL_MOUNTMGR_ENUMERATE_CREDENTIALS CTL_CODE(MOUNTMGRCONTROLTYPE, 51, METHOD_BUFFERED, FILE_READ_ACCESS)
82 struct mountmgr_credential
84 ULONG targetname_offset;
85 ULONG targetname_size;
86 ULONG username_offset;
87 ULONG username_size;
88 ULONG comment_offset;
89 ULONG comment_size;
90 ULONG blob_offset;
91 ULONG blob_size;
92 BOOL blob_preserve;
93 FILETIME last_written;
96 struct mountmgr_credential_list
98 ULONG size;
99 ULONG count;
100 ULONG filter_offset;
101 ULONG filter_size;
102 struct mountmgr_credential creds[1];
105 #define IOCTL_MOUNTMGR_QUERY_DHCP_REQUEST_PARAMS CTL_CODE(MOUNTMGRCONTROLTYPE, 64, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
107 struct mountmgr_dhcp_request_param
109 ULONG id;
110 ULONG offset;
111 ULONG size;
114 #ifndef IF_MAX_STRING_SIZE
115 #define IF_MAX_STRING_SIZE 256
116 #endif
118 struct mountmgr_dhcp_request_params
120 ULONG size;
121 ULONG count;
122 WCHAR adapter[IF_MAX_STRING_SIZE + 1];
123 struct mountmgr_dhcp_request_param params[1];
126 #define IOCTL_MOUNTMGR_QUERY_SYMBOL_FILE CTL_CODE(MOUNTMGRCONTROLTYPE, 80, METHOD_BUFFERED, FILE_READ_ACCESS)
128 #endif
130 typedef struct _MOUNTMGR_CREATE_POINT_INPUT
132 USHORT SymbolicLinkNameOffset;
133 USHORT SymbolicLinkNameLength;
134 USHORT DeviceNameOffset;
135 USHORT DeviceNameLength;
136 } MOUNTMGR_CREATE_POINT_INPUT, *PMOUNTMGR_CREATE_POINT_INPUT;
138 typedef struct _MOUNTMGR_MOUNT_POINT
140 ULONG SymbolicLinkNameOffset;
141 USHORT SymbolicLinkNameLength;
142 ULONG UniqueIdOffset;
143 USHORT UniqueIdLength;
144 ULONG DeviceNameOffset;
145 USHORT DeviceNameLength;
146 } MOUNTMGR_MOUNT_POINT, *PMOUNTMGR_MOUNT_POINT;
148 typedef struct _MOUNTMGR_MOUNT_POINTS
150 ULONG Size;
151 ULONG NumberOfMountPoints;
152 MOUNTMGR_MOUNT_POINT MountPoints[1];
153 } MOUNTMGR_MOUNT_POINTS, *PMOUNTMGR_MOUNT_POINTS;
155 typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET
157 USHORT DeviceNameLength;
158 WCHAR DeviceName[1];
159 } MOUNTMGR_DRIVE_LETTER_TARGET, *PMOUNTMGR_DRIVE_LETTER_TARGET;
161 typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION
163 BOOLEAN DriveLetterWasAssigned;
164 UCHAR CurrentDriveLetter;
165 } MOUNTMGR_DRIVE_LETTER_INFORMATION, *PMOUNTMGR_DRIVE_LETTER_INFORMATION;
167 typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT
169 USHORT SourceVolumeNameOffset;
170 USHORT SourceVolumeNameLength;
171 USHORT TargetVolumeNameOffset;
172 USHORT TargetVolumeNameLength;
173 } MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
175 typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO
177 ULONG EpicNumber;
178 } MOUNTMGR_CHANGE_NOTIFY_INFO, *PMOUNTMGR_CHANGE_NOTIFY_INFO;
180 typedef struct _MOUNTMGR_TARGET_NAME
182 USHORT DeviceNameLength;
183 WCHAR DeviceName[1];
184 } MOUNTMGR_TARGET_NAME, *PMOUNTMGR_TARGET_NAME;
186 #define MOUNTMGR_IS_DRIVE_LETTER(s) \
187 ((s)->Length == 28 && \
188 (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && (s)->Buffer[2] == 'o' && \
189 (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && (s)->Buffer[5] == 'e' && \
190 (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && (s)->Buffer[8] == 'c' && \
191 (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && (s)->Buffer[11] == '\\' && \
192 (s)->Buffer[12] >= 'A' && (s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
194 #define MOUNTMGR_IS_VOLUME_NAME(s) \
195 (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
196 (s)->Buffer[0] == '\\' && ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
197 (s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
198 (s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
199 (s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
200 (s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
201 (s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
203 #endif /* _MOUNTMGR_ */