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
28 typedef enum _SE_OBJECT_TYPE
30 SE_UNKNOWN_OBJECT_TYPE = 0,
40 SE_PROVIDER_DEFINED_OBJECT,
42 SE_REGISTRY_WOW64_32KEY
45 typedef enum _TRUSTEE_TYPE
52 TRUSTEE_IS_WELL_KNOWN_GROUP,
58 typedef enum _TRUSTEE_FORM
63 TRUSTEE_IS_OBJECTS_AND_SID,
64 TRUSTEE_IS_OBJECTS_AND_NAME
67 typedef enum _MULTIPLE_TRUSTEE_OPERATION
70 TRUSTEE_IS_IMPERSONATE,
71 } MULTIPLE_TRUSTEE_OPERATION;
73 typedef struct _OBJECTS_AND_SID
77 GUID InheritedObjectTypeGuid;
79 } OBJECTS_AND_SID, *POBJECTS_AND_SID;
81 typedef struct _OBJECTS_AND_NAME_A
84 SE_OBJECT_TYPE ObjectType;
86 LPSTR InheritedObjectTypeName;
88 } OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
90 typedef struct _OBJECTS_AND_NAME_W
93 SE_OBJECT_TYPE ObjectType;
94 LPWSTR ObjectTypeName;
95 LPWSTR InheritedObjectTypeName;
97 } OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
99 DECL_WINELIB_TYPE_AW(OBJECTS_AND_NAME_)
100 DECL_WINELIB_TYPE_AW(POBJECTS_AND_NAME_)
102 typedef struct _TRUSTEE_A
104 struct _TRUSTEE_A *pMultipleTrustee;
105 MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
106 TRUSTEE_FORM TrusteeForm;
107 TRUSTEE_TYPE TrusteeType;
109 } TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
111 typedef struct _TRUSTEE_W
113 struct _TRUSTEE_W *pMultipleTrustee;
114 MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
115 TRUSTEE_FORM TrusteeForm;
116 TRUSTEE_TYPE TrusteeType;
118 } TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
120 DECL_WINELIB_TYPE_AW(TRUSTEE_)
121 DECL_WINELIB_TYPE_AW(PTRUSTEE_)
122 DECL_WINELIB_TYPE_AW(TRUSTEE)
123 DECL_WINELIB_TYPE_AW(PTRUSTEE)
125 typedef enum _ACCESS_MODE
136 #define NO_INHERITANCE 0x0
137 #define SUB_OBJECTS_ONLY_INHERIT 0x1
138 #define SUB_CONTAINERS_ONLY_INHERIT 0x2
139 #define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
140 #define INHERIT_NO_PROPAGATE 0x4
141 #define INHERIT_ONLY 0x8
142 #define INHERITED_ACCESS_ENTRY 0x10
143 #define INHERITED_PARENT 0x10000000
144 #define INHERITED_GRANDPARENT 0x20000000
146 typedef struct _EXPLICIT_ACCESS_A
148 DWORD grfAccessPermissions;
149 ACCESS_MODE grfAccessMode;
150 DWORD grfInheritance;
152 } EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
154 typedef struct _EXPLICIT_ACCESS_W
156 DWORD grfAccessPermissions;
157 ACCESS_MODE grfAccessMode;
158 DWORD grfInheritance;
160 } EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
162 DECL_WINELIB_TYPE_AW(EXPLICIT_ACCESS_)
163 DECL_WINELIB_TYPE_AW(PEXPLICIT_ACCESS_)
164 DECL_WINELIB_TYPE_AW(EXPLICIT_ACCESS)
165 DECL_WINELIB_TYPE_AW(PEXPLICIT_ACCESS)
167 typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
168 typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
170 typedef struct _ACTRL_ACCESS_ENTRYA
174 ACCESS_RIGHTS Access;
175 ACCESS_RIGHTS ProvSpecificAccess;
176 INHERIT_FLAGS Inheritance;
177 LPSTR lpInheritProperty;
178 } ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
180 typedef struct _ACTRL_ACCESS_ENTRYW
184 ACCESS_RIGHTS Access;
185 ACCESS_RIGHTS ProvSpecificAccess;
186 INHERIT_FLAGS Inheritance;
187 LPWSTR lpInheritProperty;
188 } ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
190 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_ENTRY)
191 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_ENTRY)
194 typedef struct _ACTRL_ACCESS_ENTRY_LISTA
197 ACTRL_ACCESS_ENTRYA *pAccessList;
198 } ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
200 typedef struct _ACTRL_ACCESS_ENTRY_LISTW
203 ACTRL_ACCESS_ENTRYW *pAccessList;
204 } ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
206 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_ENTRY_LIST)
207 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_ENTRY_LIST)
209 typedef struct _ACTRL_PROPERTY_ENTRYA
212 PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
214 } ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
216 typedef struct _ACTRL_PROPERTY_ENTRYW
219 PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
221 } ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
223 DECL_WINELIB_TYPE_AW(ACTRL_PROPERTY_ENTRY)
224 DECL_WINELIB_TYPE_AW(PACTRL_PROPERTY_ENTRY)
226 typedef struct _ACTRL_ALISTA
229 PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
230 } ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
232 typedef struct _ACTRL_ALISTW
235 PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
236 } ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
238 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS)
239 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS)
240 DECL_WINELIB_TYPE_AW(ACTRL_AUDIT)
241 DECL_WINELIB_TYPE_AW(PACTRL_AUDIT)
243 #define TRUSTEE_ACCESS_ALLOWED 0x00000001
244 #define TRUSTEE_ACCESS_READ 0x00000002
245 #define TRUSTEE_ACCESS_WRITE 0x00000004
247 #define TRUSTEE_ACCESS_EXPLICIT 0x00000001
248 #define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ|TRUSTEE_ACCESS_WRITE)
249 #define TRUSTEE_ACCESS_ALL 0xFFFFFFFF
251 typedef struct _TRUSTEE_ACCESSA
254 ACCESS_RIGHTS Access;
256 ULONG fReturnedAccess;
257 } TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
259 typedef struct _TRUSTEE_ACCESSW
262 ACCESS_RIGHTS Access;
264 ULONG fReturnedAccess;
265 } TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
267 DECL_WINELIB_TYPE_AW(TRUSTEE_ACCESS)
268 DECL_WINELIB_TYPE_AW(PTRUSTEE_ACCESS)
270 #define ACTRL_RESERVED 0x00000000
271 #define ACTRL_PERM_1 0x00000001
272 #define ACTRL_PERM_2 0x00000002
273 #define ACTRL_PERM_3 0x00000004
274 #define ACTRL_PERM_4 0x00000008
275 #define ACTRL_PERM_5 0x00000010
276 #define ACTRL_PERM_6 0x00000020
277 #define ACTRL_PERM_7 0x00000040
278 #define ACTRL_PERM_8 0x00000080
279 #define ACTRL_PERM_9 0x00000100
280 #define ACTRL_PERM_10 0x00000200
281 #define ACTRL_PERM_11 0x00000400
282 #define ACTRL_PERM_12 0x00000800
283 #define ACTRL_PERM_13 0x00001000
284 #define ACTRL_PERM_14 0x00002000
285 #define ACTRL_PERM_15 0x00004000
286 #define ACTRL_PERM_16 0x00008000
287 #define ACTRL_PERM_17 0x00010000
288 #define ACTRL_PERM_18 0x00020000
289 #define ACTRL_PERM_19 0x00040000
290 #define ACTRL_PERM_20 0x00080000
292 #define ACTRL_ACCESS_ALLOWED 0x00000001
293 #define ACTRL_ACCESS_DENIED 0x00000002
294 #define ACTRL_AUDIT_SUCCESS 0x00000004
295 #define ACTRL_AUDIT_FAILURE 0x00000008
297 #define ACTRL_ACCESS_PROTECTED 0x00000001
299 #define ACTRL_SYSTEM_ACCESS 0x04000000
300 #define ACTRL_DELETE 0x08000000
301 #define ACTRL_READ_CONTROL 0x10000000
302 #define ACTRL_CHANGE_ACCESS 0x20000000
303 #define ACTRL_CHANGE_OWNER 0x40000000
304 #define ACTRL_SYNCHRONIZE 0x80000000
305 #define ACTRL_STD_RIGHTS_ALL 0xf8000000
306 #define ACTRL_STD_RIGHT_REQUIRED (ACTRL_STD_RIGHTS_ALL & ~ACTRL_SYNCHRONIZE)
308 #define ACTRL_DS_OPEN ACTRL_RESERVED
309 #define ACTRL_DS_CREATE_CHILD ACTRL_PERM_1
310 #define ACTRL_DS_DELETE_CHILD ACTRL_PERM_2
311 #define ACTRL_DS_LIST ACTRL_PERM_3
312 #define ACTRL_DS_SELF ACTRL_PERM_4
313 #define ACTRL_DS_READ_PROP ACTRL_PERM_5
314 #define ACTRL_DS_WRITE_PROP ACTRL_PERM_6
315 #define ACTRL_DS_DELETE_TREE ACTRL_PERM_7
316 #define ACTRL_DS_LIST_OBJECT ACTRL_PERM_8
317 #define ACTRL_DS_CONTROL_ACCESS ACTRL_PERM_9
319 #define ACTRL_FILE_READ ACTRL_PERM_1
320 #define ACTRL_FILE_WRITE ACTRL_PERM_2
321 #define ACTRL_FILE_APPEND ACTRL_PERM_3
322 #define ACTRL_FILE_READ_PROP ACTRL_PERM_4
323 #define ACTRL_FILE_WRITE_PROP ACTRL_PERM_5
324 #define ACTRL_FILE_EXECUTE ACTRL_PERM_6
325 #define ACTRL_FILE_READ_ATTRIB ACTRL_PERM_8
326 #define ACTRL_FILE_WRITE_ATTRIB ACTRL_PERM_9
327 #define ACTRL_FILE_CREATE_PIPE ACTRL_PERM_10
328 #define ACTRL_DIR_LIST ACTRL_PERM_1
329 #define ACTRL_DIR_CREATE_OBJECT ACTRL_PERM_2
330 #define ACTRL_DIR_CREATE_CHILD ACTRL_PERM_3
331 #define ACTRL_DIR_DELETE_CHILD ACTRL_PERM_7
332 #define ACTRL_DIR_TRAVERSE ACTRL_PERM_6
333 #define ACTRL_KERNEL_TERMINATE ACTRL_PERM_1
334 #define ACTRL_KERNEL_THREAD ACTRL_PERM_2
335 #define ACTRL_KERNEL_VM ACTRL_PERM_3
336 #define ACTRL_KERNEL_VM_READ ACTRL_PERM_4
337 #define ACTRL_KERNEL_VM_WRITE ACTRL_PERM_5
338 #define ACTRL_KERNEL_DUP_HANDLE ACTRL_PERM_6
339 #define ACTRL_KERNEL_PROCESS ACTRL_PERM_7
340 #define ACTRL_KERNEL_SET_INFO ACTRL_PERM_8
341 #define ACTRL_KERNEL_GET_INFO ACTRL_PERM_9
342 #define ACTRL_KERNEL_CONTROL ACTRL_PERM_10
343 #define ACTRL_KERNEL_ALERT ACTRL_PERM_11
344 #define ACTRL_KERNEL_GET_CONTEXT ACTRL_PERM_12
345 #define ACTRL_KERNEL_SET_CONTEXT ACTRL_PERM_13
346 #define ACTRL_KERNEL_TOKEN ACTRL_PERM_14
347 #define ACTRL_KERNEL_IMPERSONATE ACTRL_PERM_15
348 #define ACTRL_KERNEL_DIMPERSONATE ACTRL_PERM_16
349 #define ACTRL_PRINT_SADMIN ACTRL_PERM_1
350 #define ACTRL_PRINT_SLIST ACTRL_PERM_2
351 #define ACTRL_PRINT_PADMIN ACTRL_PERM_3
352 #define ACTRL_PRINT_PUSE ACTRL_PERM_4
353 #define ACTRL_PRINT_JADMIN ACTRL_PERM_5
354 #define ACTRL_SVC_GET_INFO ACTRL_PERM_1
355 #define ACTRL_SVC_SET_INFO ACTRL_PERM_2
356 #define ACTRL_SVC_STATUS ACTRL_PERM_3
357 #define ACTRL_SVC_LIST ACTRL_PERM_4
358 #define ACTRL_SVC_START ACTRL_PERM_5
359 #define ACTRL_SVC_STOP ACTRL_PERM_6
360 #define ACTRL_SVC_PAUSE ACTRL_PERM_7
361 #define ACTRL_SVC_INTERROGATE ACTRL_PERM_8
362 #define ACTRL_SVC_UCONTROL ACTRL_PERM_9
363 #define ACTRL_REG_QUERY ACTRL_PERM_1
364 #define ACTRL_REG_SET ACTRL_PERM_2
365 #define ACTRL_REG_CREATE_CHILD ACTRL_PERM_3
366 #define ACTRL_REG_LIST ACTRL_PERM_4
367 #define ACTRL_REG_NOTIFY ACTRL_PERM_5
368 #define ACTRL_REG_LINK ACTRL_PERM_6
369 #define ACTRL_WIN_CLIPBRD ACTRL_PERM_1
370 #define ACTRL_WIN_GLOBAL_ATOMS ACTRL_PERM_2
371 #define ACTRL_WIN_CREATE ACTRL_PERM_3
372 #define ACTRL_WIN_LIST_DESK ACTRL_PERM_4
373 #define ACTRL_WIN_LIST ACTRL_PERM_5
374 #define ACTRL_WIN_READ_ATTRIBS ACTRL_PERM_6
375 #define ACTRL_WIN_WRITE_ATTRIBS ACTRL_PERM_7
376 #define ACTRL_WIN_SCREEN ACTRL_PERM_8
377 #define ACTRL_WIN_EXIT ACTRL_PERM_9
379 #define ACTRL_ACCESS_NO_OPTIONS 0x00000000
380 #define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
382 typedef struct _ACTRL_OVERLAPPED
390 } ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
392 typedef struct _ACTRL_ACCESS_INFOA
394 ULONG fAccessPermission;
395 LPSTR lpAccessPermissionName;
396 } ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
398 typedef struct _ACTRL_ACCESS_INFOW
400 ULONG fAccessPermission;
401 LPWSTR lpAccessPermissionName;
402 } ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
404 DECL_WINELIB_TYPE_AW(ACTRL_ACCESS_INFO)
405 DECL_WINELIB_TYPE_AW(PACTRL_ACCESS_INFO)
407 typedef struct _ACTRL_CONTROL_INFOA
411 } ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
413 typedef struct _ACTRL_CONTROL_INFOW
416 LPWSTR lpControlName;
417 } ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
419 DECL_WINELIB_TYPE_AW(ACTRL_CONTROL_INFO)
420 DECL_WINELIB_TYPE_AW(PACTRL_CONTROL_INFO)
422 typedef enum _PROGRESS_INVOKE_SETTING {
423 ProgressInvokeNever = 1,
424 ProgressInvokeEveryObject,
425 ProgressInvokeOnError,
426 ProgressCancelOperation,
427 ProgressRetryOperation
428 } PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
430 typedef struct _INHERITED_FROMA
434 } INHERITED_FROMA, *PINHERITED_FROMA;
436 typedef struct _INHERITED_FROMW
440 } INHERITED_FROMW, *PINHERITED_FROMW;
442 DECL_WINELIB_TYPE_AW(INHERITED_FROM)
443 DECL_WINELIB_TYPE_AW(PINHERITED_FROM)
445 #define AccFree LocalFree
451 #endif /* __WINE_ACCCTRL_H */