mf/tests: Simplify video processor expected input types checks.
[wine.git] / include / ddk / mountmgr.h
blob4eda8565eaff41b4ec858d7891453188818f5f05
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 #include "ifdef.h"
26 #define MOUNTMGRCONTROLTYPE ((ULONG)'m')
27 #define MOUNTDEVCONTROLTYPE ((ULONG)'M')
29 #if defined(_MSC_VER) || defined(__MINGW32__)
30 #define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
31 #define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
32 #else
33 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};
34 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};
35 #endif
38 #define IOCTL_MOUNTMGR_CREATE_POINT CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
39 #define IOCTL_MOUNTMGR_DELETE_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
40 #define IOCTL_MOUNTMGR_QUERY_POINTS CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
41 #define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
42 #define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
43 #define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
44 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
45 #define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
46 #define IOCTL_MOUNTMGR_CHANGE_NOTIFY CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
47 #define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
48 #define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
49 #define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
51 /* Wine extensions */
52 #ifdef WINE_MOUNTMGR_EXTENSIONS
54 #define IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 32, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
55 #define IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE CTL_CODE(MOUNTMGRCONTROLTYPE, 33, METHOD_BUFFERED, FILE_READ_ACCESS)
56 #define IOCTL_MOUNTMGR_DEFINE_SHELL_FOLDER CTL_CODE(MOUNTMGRCONTROLTYPE, 34, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
57 #define IOCTL_MOUNTMGR_QUERY_SHELL_FOLDER CTL_CODE(MOUNTMGRCONTROLTYPE, 35, METHOD_BUFFERED, FILE_READ_ACCESS)
59 enum mountmgr_fs_type
61 MOUNTMGR_FS_TYPE_NTFS,
62 MOUNTMGR_FS_TYPE_FAT,
63 MOUNTMGR_FS_TYPE_FAT32,
64 MOUNTMGR_FS_TYPE_ISO9660,
65 MOUNTMGR_FS_TYPE_UDF,
68 struct mountmgr_unix_drive
70 ULONG size;
71 ULONG type;
72 ULONG fs_type;
73 DWORD serial;
74 ULONGLONG unix_dev;
75 WCHAR letter;
76 USHORT mount_point_offset;
77 USHORT device_offset;
78 USHORT label_offset;
81 struct mountmgr_shell_folder
83 BOOL create_backup;
84 ULONG folder_offset;
85 ULONG folder_size;
86 ULONG symlink_offset;
89 #define IOCTL_MOUNTMGR_READ_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 48, METHOD_BUFFERED, FILE_READ_ACCESS)
90 #define IOCTL_MOUNTMGR_WRITE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 49, METHOD_BUFFERED, FILE_WRITE_ACCESS)
91 #define IOCTL_MOUNTMGR_DELETE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 50, METHOD_BUFFERED, FILE_WRITE_ACCESS)
92 #define IOCTL_MOUNTMGR_ENUMERATE_CREDENTIALS CTL_CODE(MOUNTMGRCONTROLTYPE, 51, METHOD_BUFFERED, FILE_READ_ACCESS)
94 struct mountmgr_credential
96 ULONG targetname_offset;
97 ULONG targetname_size;
98 ULONG username_offset;
99 ULONG username_size;
100 ULONG comment_offset;
101 ULONG comment_size;
102 ULONG blob_offset;
103 ULONG blob_size;
104 BOOL blob_preserve;
105 FILETIME last_written;
108 struct mountmgr_credential_list
110 ULONG size;
111 ULONG count;
112 ULONG filter_offset;
113 ULONG filter_size;
114 struct mountmgr_credential creds[1];
117 #define IOCTL_MOUNTMGR_QUERY_DHCP_REQUEST_PARAMS CTL_CODE(MOUNTMGRCONTROLTYPE, 64, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
119 struct mountmgr_dhcp_request_param
121 ULONG id;
122 ULONG offset;
123 ULONG size;
126 #ifndef IF_MAX_STRING_SIZE
127 #define IF_MAX_STRING_SIZE 256
128 #endif
130 struct mountmgr_dhcp_request_params
132 ULONG size;
133 ULONG count;
134 char unix_name[16];
135 struct mountmgr_dhcp_request_param params[1];
138 #define IOCTL_MOUNTMGR_QUERY_SYMBOL_FILE CTL_CODE(MOUNTMGRCONTROLTYPE, 80, METHOD_BUFFERED, FILE_READ_ACCESS)
140 #endif
142 typedef struct _MOUNTMGR_CREATE_POINT_INPUT
144 USHORT SymbolicLinkNameOffset;
145 USHORT SymbolicLinkNameLength;
146 USHORT DeviceNameOffset;
147 USHORT DeviceNameLength;
148 } MOUNTMGR_CREATE_POINT_INPUT, *PMOUNTMGR_CREATE_POINT_INPUT;
150 typedef struct _MOUNTMGR_MOUNT_POINT
152 ULONG SymbolicLinkNameOffset;
153 USHORT SymbolicLinkNameLength;
154 ULONG UniqueIdOffset;
155 USHORT UniqueIdLength;
156 ULONG DeviceNameOffset;
157 USHORT DeviceNameLength;
158 } MOUNTMGR_MOUNT_POINT, *PMOUNTMGR_MOUNT_POINT;
160 typedef struct _MOUNTMGR_MOUNT_POINTS
162 ULONG Size;
163 ULONG NumberOfMountPoints;
164 MOUNTMGR_MOUNT_POINT MountPoints[1];
165 } MOUNTMGR_MOUNT_POINTS, *PMOUNTMGR_MOUNT_POINTS;
167 typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET
169 USHORT DeviceNameLength;
170 WCHAR DeviceName[1];
171 } MOUNTMGR_DRIVE_LETTER_TARGET, *PMOUNTMGR_DRIVE_LETTER_TARGET;
173 typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION
175 BOOLEAN DriveLetterWasAssigned;
176 UCHAR CurrentDriveLetter;
177 } MOUNTMGR_DRIVE_LETTER_INFORMATION, *PMOUNTMGR_DRIVE_LETTER_INFORMATION;
179 typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT
181 USHORT SourceVolumeNameOffset;
182 USHORT SourceVolumeNameLength;
183 USHORT TargetVolumeNameOffset;
184 USHORT TargetVolumeNameLength;
185 } MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
187 typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO
189 ULONG EpicNumber;
190 } MOUNTMGR_CHANGE_NOTIFY_INFO, *PMOUNTMGR_CHANGE_NOTIFY_INFO;
192 typedef struct _MOUNTMGR_TARGET_NAME
194 USHORT DeviceNameLength;
195 WCHAR DeviceName[1];
196 } MOUNTMGR_TARGET_NAME, *PMOUNTMGR_TARGET_NAME;
198 #define MOUNTMGR_IS_DRIVE_LETTER(s) \
199 ((s)->Length == 28 && \
200 (s)->Buffer[0] == '\\' && (s)->Buffer[1] == 'D' && (s)->Buffer[2] == 'o' && \
201 (s)->Buffer[3] == 's' && (s)->Buffer[4] == 'D' && (s)->Buffer[5] == 'e' && \
202 (s)->Buffer[6] == 'v' && (s)->Buffer[7] == 'i' && (s)->Buffer[8] == 'c' && \
203 (s)->Buffer[9] == 'e' && (s)->Buffer[10] == 's' && (s)->Buffer[11] == '\\' && \
204 (s)->Buffer[12] >= 'A' && (s)->Buffer[12] <= 'Z' && (s)->Buffer[13] == ':')
206 #define MOUNTMGR_IS_VOLUME_NAME(s) \
207 (((s)->Length == 96 || ((s)->Length == 98 && (s)->Buffer[48] == '\\')) && \
208 (s)->Buffer[0] == '\\' && ((s)->Buffer[1] == '?' || (s)->Buffer[1] == '\\') && \
209 (s)->Buffer[2] == '?' && (s)->Buffer[3] == '\\' && (s)->Buffer[4] == 'V' && \
210 (s)->Buffer[5] == 'o' && (s)->Buffer[6] == 'l' && (s)->Buffer[7] == 'u' && \
211 (s)->Buffer[8] == 'm' && (s)->Buffer[9] == 'e' && (s)->Buffer[10] == '{' && \
212 (s)->Buffer[19] == '-' && (s)->Buffer[24] == '-' && (s)->Buffer[29] == '-' && \
213 (s)->Buffer[34] == '-' && (s)->Buffer[47] == '}')
215 #endif /* _MOUNTMGR_ */