include: Add STORAGE_HOTPLUG_INFO structure.
[wine.git] / include / accctrl.h
blob8ecdd9e1bee5fe166a6b25d122c587d099148a54
1 /*
2 * Copyright (C) 2002 Alexandre Julliard
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_ACCCTRL_H
20 #define __WINE_ACCCTRL_H
22 #include <wtypes.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 typedef enum _SE_OBJECT_TYPE
30 SE_UNKNOWN_OBJECT_TYPE = 0,
31 SE_FILE_OBJECT,
32 SE_SERVICE,
33 SE_PRINTER,
34 SE_REGISTRY_KEY,
35 SE_LMSHARE,
36 SE_KERNEL_OBJECT,
37 SE_WINDOW_OBJECT,
38 SE_DS_OBJECT,
39 SE_DS_OBJECT_ALL,
40 SE_PROVIDER_DEFINED_OBJECT,
41 SE_WMIGUID_OBJECT,
42 SE_REGISTRY_WOW64_32KEY,
43 SE_REGISTRY_WOW64_64KEY,
44 } SE_OBJECT_TYPE;
46 typedef enum _TRUSTEE_TYPE
48 TRUSTEE_IS_UNKNOWN,
49 TRUSTEE_IS_USER,
50 TRUSTEE_IS_GROUP,
51 TRUSTEE_IS_DOMAIN,
52 TRUSTEE_IS_ALIAS,
53 TRUSTEE_IS_WELL_KNOWN_GROUP,
54 TRUSTEE_IS_DELETED,
55 TRUSTEE_IS_INVALID,
56 TRUSTEE_IS_COMPUTER
57 } TRUSTEE_TYPE;
59 typedef enum _TRUSTEE_FORM
61 TRUSTEE_IS_SID,
62 TRUSTEE_IS_NAME,
63 TRUSTEE_BAD_FORM,
64 TRUSTEE_IS_OBJECTS_AND_SID,
65 TRUSTEE_IS_OBJECTS_AND_NAME
66 } TRUSTEE_FORM;
68 typedef enum _MULTIPLE_TRUSTEE_OPERATION
70 NO_MULTIPLE_TRUSTEE,
71 TRUSTEE_IS_IMPERSONATE,
72 } MULTIPLE_TRUSTEE_OPERATION;
74 typedef struct _OBJECTS_AND_SID
76 DWORD ObjectsPresent;
77 GUID ObjectTypeGuid;
78 GUID InheritedObjectTypeGuid;
79 SID *pSid;
80 } OBJECTS_AND_SID, *POBJECTS_AND_SID;
82 typedef struct _OBJECTS_AND_NAME_A
84 DWORD ObjectsPresent;
85 SE_OBJECT_TYPE ObjectType;
86 LPSTR ObjectTypeName;
87 LPSTR InheritedObjectTypeName;
88 LPSTR ptstrName;
89 } OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
91 typedef struct _OBJECTS_AND_NAME_W
93 DWORD ObjectsPresent;
94 SE_OBJECT_TYPE ObjectType;
95 LPWSTR ObjectTypeName;
96 LPWSTR InheritedObjectTypeName;
97 LPWSTR ptstrName;
98 } OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
100 DECL_WINELIB_TYPE_AW(OBJECTS_AND_NAME_)
101 DECL_WINELIB_TYPE_AW(POBJECTS_AND_NAME_)
103 typedef struct _TRUSTEE_A
105 struct _TRUSTEE_A *pMultipleTrustee;
106 MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
107 TRUSTEE_FORM TrusteeForm;
108 TRUSTEE_TYPE TrusteeType;
109 LPSTR ptstrName;
110 } TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
112 typedef struct _TRUSTEE_W
114 struct _TRUSTEE_W *pMultipleTrustee;
115 MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
116 TRUSTEE_FORM TrusteeForm;
117 TRUSTEE_TYPE TrusteeType;
118 LPWSTR ptstrName;
119 } TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
121 DECL_WINELIB_TYPE_AW(TRUSTEE_)
122 DECL_WINELIB_TYPE_AW(PTRUSTEE_)
123 DECL_WINELIB_TYPE_AW(TRUSTEE)
124 DECL_WINELIB_TYPE_AW(PTRUSTEE)
126 typedef enum _ACCESS_MODE
128 NOT_USED_ACCESS = 0,
129 GRANT_ACCESS,
130 SET_ACCESS,
131 DENY_ACCESS,
132 REVOKE_ACCESS,
133 SET_AUDIT_SUCCESS,
134 SET_AUDIT_FAILURE
135 } ACCESS_MODE;
137 #define NO_INHERITANCE 0x0
138 #define SUB_OBJECTS_ONLY_INHERIT 0x1
139 #define SUB_CONTAINERS_ONLY_INHERIT 0x2
140 #define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
141 #define INHERIT_NO_PROPAGATE 0x4
142 #define INHERIT_ONLY 0x8
143 #define INHERITED_ACCESS_ENTRY 0x10
144 #define INHERITED_PARENT 0x10000000
145 #define INHERITED_GRANDPARENT 0x20000000
147 typedef struct _EXPLICIT_ACCESS_A
149 DWORD grfAccessPermissions;
150 ACCESS_MODE grfAccessMode;
151 DWORD grfInheritance;
152 TRUSTEE_A Trustee;
153 } EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
155 typedef struct _EXPLICIT_ACCESS_W
157 DWORD grfAccessPermissions;
158 ACCESS_MODE grfAccessMode;
159 DWORD grfInheritance;
160 TRUSTEE_W Trustee;
161 } EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
163 DECL_WINELIB_TYPE_AW(EXPLICIT_ACCESS_)
164 DECL_WINELIB_TYPE_AW(PEXPLICIT_ACCESS_)
165 DECL_WINELIB_TYPE_AW(EXPLICIT_ACCESS)
166 DECL_WINELIB_TYPE_AW(PEXPLICIT_ACCESS)
168 typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
169 typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
171 typedef struct _ACTRL_ACCESS_ENTRYA
173 TRUSTEE_A Trustee;
174 ULONG fAccessFlags;
175 ACCESS_RIGHTS Access;
176 ACCESS_RIGHTS ProvSpecificAccess;
177 INHERIT_FLAGS Inheritance;
178 LPSTR lpInheritProperty;
179 } ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
181 typedef struct _ACTRL_ACCESS_ENTRYW
183 TRUSTEE_W Trustee;
184 ULONG fAccessFlags;
185 ACCESS_RIGHTS Access;
186 ACCESS_RIGHTS ProvSpecificAccess;
187 INHERIT_FLAGS Inheritance;
188 LPWSTR lpInheritProperty;
189 } ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
191 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_ENTRY)
192 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_ENTRY)
195 typedef struct _ACTRL_ACCESS_ENTRY_LISTA
197 ULONG cEntries;
198 ACTRL_ACCESS_ENTRYA *pAccessList;
199 } ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
201 typedef struct _ACTRL_ACCESS_ENTRY_LISTW
203 ULONG cEntries;
204 ACTRL_ACCESS_ENTRYW *pAccessList;
205 } ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
207 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_ENTRY_LIST)
208 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_ENTRY_LIST)
210 typedef struct _ACTRL_PROPERTY_ENTRYA
212 LPSTR lpProperty;
213 PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
214 ULONG fListFlags;
215 } ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
217 typedef struct _ACTRL_PROPERTY_ENTRYW
219 LPWSTR lpProperty;
220 PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
221 ULONG fListFlags;
222 } ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
224 DECL_WINELIB_TYPE_AW(ACTRL_PROPERTY_ENTRY)
225 DECL_WINELIB_TYPE_AW(PACTRL_PROPERTY_ENTRY)
227 typedef struct _ACTRL_ALISTA
229 ULONG cEntries;
230 PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
231 } ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
233 typedef struct _ACTRL_ALISTW
235 ULONG cEntries;
236 PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
237 } ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
239 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS)
240 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS)
241 DECL_WINELIB_TYPE_AW(ACTRL_AUDIT)
242 DECL_WINELIB_TYPE_AW(PACTRL_AUDIT)
244 #define TRUSTEE_ACCESS_ALLOWED 0x00000001
245 #define TRUSTEE_ACCESS_READ 0x00000002
246 #define TRUSTEE_ACCESS_WRITE 0x00000004
248 #define TRUSTEE_ACCESS_EXPLICIT 0x00000001
249 #define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ|TRUSTEE_ACCESS_WRITE)
250 #define TRUSTEE_ACCESS_ALL 0xFFFFFFFF
252 typedef struct _TRUSTEE_ACCESSA
254 LPSTR lpProperty;
255 ACCESS_RIGHTS Access;
256 ULONG fAccessFlags;
257 ULONG fReturnedAccess;
258 } TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
260 typedef struct _TRUSTEE_ACCESSW
262 LPWSTR lpProperty;
263 ACCESS_RIGHTS Access;
264 ULONG fAccessFlags;
265 ULONG fReturnedAccess;
266 } TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
268 DECL_WINELIB_TYPE_AW(TRUSTEE_ACCESS)
269 DECL_WINELIB_TYPE_AW(PTRUSTEE_ACCESS)
271 #define ACTRL_RESERVED 0x00000000
272 #define ACTRL_PERM_1 0x00000001
273 #define ACTRL_PERM_2 0x00000002
274 #define ACTRL_PERM_3 0x00000004
275 #define ACTRL_PERM_4 0x00000008
276 #define ACTRL_PERM_5 0x00000010
277 #define ACTRL_PERM_6 0x00000020
278 #define ACTRL_PERM_7 0x00000040
279 #define ACTRL_PERM_8 0x00000080
280 #define ACTRL_PERM_9 0x00000100
281 #define ACTRL_PERM_10 0x00000200
282 #define ACTRL_PERM_11 0x00000400
283 #define ACTRL_PERM_12 0x00000800
284 #define ACTRL_PERM_13 0x00001000
285 #define ACTRL_PERM_14 0x00002000
286 #define ACTRL_PERM_15 0x00004000
287 #define ACTRL_PERM_16 0x00008000
288 #define ACTRL_PERM_17 0x00010000
289 #define ACTRL_PERM_18 0x00020000
290 #define ACTRL_PERM_19 0x00040000
291 #define ACTRL_PERM_20 0x00080000
293 #define ACTRL_ACCESS_ALLOWED 0x00000001
294 #define ACTRL_ACCESS_DENIED 0x00000002
295 #define ACTRL_AUDIT_SUCCESS 0x00000004
296 #define ACTRL_AUDIT_FAILURE 0x00000008
298 #define ACTRL_ACCESS_PROTECTED 0x00000001
300 #define ACTRL_SYSTEM_ACCESS 0x04000000
301 #define ACTRL_DELETE 0x08000000
302 #define ACTRL_READ_CONTROL 0x10000000
303 #define ACTRL_CHANGE_ACCESS 0x20000000
304 #define ACTRL_CHANGE_OWNER 0x40000000
305 #define ACTRL_SYNCHRONIZE 0x80000000
306 #define ACTRL_STD_RIGHTS_ALL 0xf8000000
307 #define ACTRL_STD_RIGHT_REQUIRED (ACTRL_STD_RIGHTS_ALL & ~ACTRL_SYNCHRONIZE)
309 #define ACTRL_DS_OPEN ACTRL_RESERVED
310 #define ACTRL_DS_CREATE_CHILD ACTRL_PERM_1
311 #define ACTRL_DS_DELETE_CHILD ACTRL_PERM_2
312 #define ACTRL_DS_LIST ACTRL_PERM_3
313 #define ACTRL_DS_SELF ACTRL_PERM_4
314 #define ACTRL_DS_READ_PROP ACTRL_PERM_5
315 #define ACTRL_DS_WRITE_PROP ACTRL_PERM_6
316 #define ACTRL_DS_DELETE_TREE ACTRL_PERM_7
317 #define ACTRL_DS_LIST_OBJECT ACTRL_PERM_8
318 #define ACTRL_DS_CONTROL_ACCESS ACTRL_PERM_9
320 #define ACTRL_FILE_READ ACTRL_PERM_1
321 #define ACTRL_FILE_WRITE ACTRL_PERM_2
322 #define ACTRL_FILE_APPEND ACTRL_PERM_3
323 #define ACTRL_FILE_READ_PROP ACTRL_PERM_4
324 #define ACTRL_FILE_WRITE_PROP ACTRL_PERM_5
325 #define ACTRL_FILE_EXECUTE ACTRL_PERM_6
326 #define ACTRL_FILE_READ_ATTRIB ACTRL_PERM_8
327 #define ACTRL_FILE_WRITE_ATTRIB ACTRL_PERM_9
328 #define ACTRL_FILE_CREATE_PIPE ACTRL_PERM_10
329 #define ACTRL_DIR_LIST ACTRL_PERM_1
330 #define ACTRL_DIR_CREATE_OBJECT ACTRL_PERM_2
331 #define ACTRL_DIR_CREATE_CHILD ACTRL_PERM_3
332 #define ACTRL_DIR_DELETE_CHILD ACTRL_PERM_7
333 #define ACTRL_DIR_TRAVERSE ACTRL_PERM_6
334 #define ACTRL_KERNEL_TERMINATE ACTRL_PERM_1
335 #define ACTRL_KERNEL_THREAD ACTRL_PERM_2
336 #define ACTRL_KERNEL_VM ACTRL_PERM_3
337 #define ACTRL_KERNEL_VM_READ ACTRL_PERM_4
338 #define ACTRL_KERNEL_VM_WRITE ACTRL_PERM_5
339 #define ACTRL_KERNEL_DUP_HANDLE ACTRL_PERM_6
340 #define ACTRL_KERNEL_PROCESS ACTRL_PERM_7
341 #define ACTRL_KERNEL_SET_INFO ACTRL_PERM_8
342 #define ACTRL_KERNEL_GET_INFO ACTRL_PERM_9
343 #define ACTRL_KERNEL_CONTROL ACTRL_PERM_10
344 #define ACTRL_KERNEL_ALERT ACTRL_PERM_11
345 #define ACTRL_KERNEL_GET_CONTEXT ACTRL_PERM_12
346 #define ACTRL_KERNEL_SET_CONTEXT ACTRL_PERM_13
347 #define ACTRL_KERNEL_TOKEN ACTRL_PERM_14
348 #define ACTRL_KERNEL_IMPERSONATE ACTRL_PERM_15
349 #define ACTRL_KERNEL_DIMPERSONATE ACTRL_PERM_16
350 #define ACTRL_PRINT_SADMIN ACTRL_PERM_1
351 #define ACTRL_PRINT_SLIST ACTRL_PERM_2
352 #define ACTRL_PRINT_PADMIN ACTRL_PERM_3
353 #define ACTRL_PRINT_PUSE ACTRL_PERM_4
354 #define ACTRL_PRINT_JADMIN ACTRL_PERM_5
355 #define ACTRL_SVC_GET_INFO ACTRL_PERM_1
356 #define ACTRL_SVC_SET_INFO ACTRL_PERM_2
357 #define ACTRL_SVC_STATUS ACTRL_PERM_3
358 #define ACTRL_SVC_LIST ACTRL_PERM_4
359 #define ACTRL_SVC_START ACTRL_PERM_5
360 #define ACTRL_SVC_STOP ACTRL_PERM_6
361 #define ACTRL_SVC_PAUSE ACTRL_PERM_7
362 #define ACTRL_SVC_INTERROGATE ACTRL_PERM_8
363 #define ACTRL_SVC_UCONTROL ACTRL_PERM_9
364 #define ACTRL_REG_QUERY ACTRL_PERM_1
365 #define ACTRL_REG_SET ACTRL_PERM_2
366 #define ACTRL_REG_CREATE_CHILD ACTRL_PERM_3
367 #define ACTRL_REG_LIST ACTRL_PERM_4
368 #define ACTRL_REG_NOTIFY ACTRL_PERM_5
369 #define ACTRL_REG_LINK ACTRL_PERM_6
370 #define ACTRL_WIN_CLIPBRD ACTRL_PERM_1
371 #define ACTRL_WIN_GLOBAL_ATOMS ACTRL_PERM_2
372 #define ACTRL_WIN_CREATE ACTRL_PERM_3
373 #define ACTRL_WIN_LIST_DESK ACTRL_PERM_4
374 #define ACTRL_WIN_LIST ACTRL_PERM_5
375 #define ACTRL_WIN_READ_ATTRIBS ACTRL_PERM_6
376 #define ACTRL_WIN_WRITE_ATTRIBS ACTRL_PERM_7
377 #define ACTRL_WIN_SCREEN ACTRL_PERM_8
378 #define ACTRL_WIN_EXIT ACTRL_PERM_9
380 #define ACTRL_ACCESS_NO_OPTIONS 0x00000000
381 #define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
383 typedef struct _ACTRL_OVERLAPPED
385 union {
386 PVOID Provider;
387 ULONG Reserved1;
388 } DUMMYUNIONNAME;
389 ULONG Reserved2;
390 HANDLE hEvent;
391 } ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
393 typedef struct _ACTRL_ACCESS_INFOA
395 ULONG fAccessPermission;
396 LPSTR lpAccessPermissionName;
397 } ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
399 typedef struct _ACTRL_ACCESS_INFOW
401 ULONG fAccessPermission;
402 LPWSTR lpAccessPermissionName;
403 } ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
405 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_INFO)
406 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_INFO)
408 typedef struct _ACTRL_CONTROL_INFOA
410 LPSTR lpControlId;
411 LPSTR lpControlName;
412 } ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
414 typedef struct _ACTRL_CONTROL_INFOW
416 LPWSTR lpControlId;
417 LPWSTR lpControlName;
418 } ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
420 DECL_WINELIB_TYPE_AW(ACTRL_CONTROL_INFO)
421 DECL_WINELIB_TYPE_AW(PACTRL_CONTROL_INFO)
423 typedef enum _PROGRESS_INVOKE_SETTING {
424 ProgressInvokeNever = 1,
425 ProgressInvokeEveryObject,
426 ProgressInvokeOnError,
427 ProgressCancelOperation,
428 ProgressRetryOperation
429 } PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
431 typedef struct _INHERITED_FROMA
433 LONG GenerationGap;
434 LPSTR AncestorName;
435 } INHERITED_FROMA, *PINHERITED_FROMA;
437 typedef struct _INHERITED_FROMW
439 LONG GenerationGap;
440 LPWSTR AncestorName;
441 } INHERITED_FROMW, *PINHERITED_FROMW;
443 DECL_WINELIB_TYPE_AW(INHERITED_FROM)
444 DECL_WINELIB_TYPE_AW(PINHERITED_FROM)
446 #define AccFree LocalFree
448 #ifdef __cplusplus
450 #endif
452 #endif /* __WINE_ACCCTRL_H */