[1166] | 1 | /**
|
---|
| 2 | * This file is part of the mingw-w64 runtime package.
|
---|
| 3 | * No warranty is given; refer to the file DISCLAIMER within this package.
|
---|
| 4 | */
|
---|
| 5 | #ifndef __ACCESS_CONTROL__
|
---|
| 6 | #define __ACCESS_CONTROL__
|
---|
| 7 |
|
---|
| 8 | #ifndef __WIDL__
|
---|
| 9 | #include <_mingw_unicode.h>
|
---|
| 10 | #include <wtypes.h>
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 | #include <winapifamily.h>
|
---|
| 14 |
|
---|
| 15 | #ifdef __cplusplus
|
---|
| 16 | extern "C" {
|
---|
| 17 | #endif
|
---|
| 18 |
|
---|
| 19 | #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
|
---|
| 20 | #define AccFree LocalFree
|
---|
| 21 |
|
---|
| 22 | typedef enum _SE_OBJECT_TYPE {
|
---|
| 23 | SE_UNKNOWN_OBJECT_TYPE = 0,
|
---|
| 24 | SE_FILE_OBJECT,
|
---|
| 25 | SE_SERVICE,
|
---|
| 26 | SE_PRINTER,
|
---|
| 27 | SE_REGISTRY_KEY,
|
---|
| 28 | SE_LMSHARE,
|
---|
| 29 | SE_KERNEL_OBJECT,
|
---|
| 30 | SE_WINDOW_OBJECT,
|
---|
| 31 | SE_DS_OBJECT,
|
---|
| 32 | SE_DS_OBJECT_ALL,
|
---|
| 33 | SE_PROVIDER_DEFINED_OBJECT,
|
---|
| 34 | SE_WMIGUID_OBJECT,
|
---|
| 35 | SE_REGISTRY_WOW64_32KEY,
|
---|
| 36 | } SE_OBJECT_TYPE;
|
---|
| 37 |
|
---|
| 38 | typedef enum _TRUSTEE_TYPE {
|
---|
| 39 | TRUSTEE_IS_UNKNOWN,
|
---|
| 40 | TRUSTEE_IS_USER,
|
---|
| 41 | TRUSTEE_IS_GROUP,
|
---|
| 42 | TRUSTEE_IS_DOMAIN,
|
---|
| 43 | TRUSTEE_IS_ALIAS,
|
---|
| 44 | TRUSTEE_IS_WELL_KNOWN_GROUP,
|
---|
| 45 | TRUSTEE_IS_DELETED,
|
---|
| 46 | TRUSTEE_IS_INVALID,
|
---|
| 47 | TRUSTEE_IS_COMPUTER
|
---|
| 48 | } TRUSTEE_TYPE;
|
---|
| 49 | typedef enum _TRUSTEE_FORM {
|
---|
| 50 | TRUSTEE_IS_SID,
|
---|
| 51 | TRUSTEE_IS_NAME,
|
---|
| 52 | TRUSTEE_BAD_FORM,
|
---|
| 53 | TRUSTEE_IS_OBJECTS_AND_SID,
|
---|
| 54 | TRUSTEE_IS_OBJECTS_AND_NAME
|
---|
| 55 | } TRUSTEE_FORM;
|
---|
| 56 |
|
---|
| 57 | typedef enum _MULTIPLE_TRUSTEE_OPERATION {
|
---|
| 58 | NO_MULTIPLE_TRUSTEE,
|
---|
| 59 | TRUSTEE_IS_IMPERSONATE,
|
---|
| 60 | } MULTIPLE_TRUSTEE_OPERATION;
|
---|
| 61 |
|
---|
| 62 | typedef struct _OBJECTS_AND_SID {
|
---|
| 63 | DWORD ObjectsPresent;
|
---|
| 64 | GUID ObjectTypeGuid;
|
---|
| 65 | GUID InheritedObjectTypeGuid;
|
---|
| 66 | SID *pSid;
|
---|
| 67 | } OBJECTS_AND_SID, *POBJECTS_AND_SID;
|
---|
| 68 |
|
---|
| 69 | typedef struct _OBJECTS_AND_NAME_A {
|
---|
| 70 | DWORD ObjectsPresent;
|
---|
| 71 | SE_OBJECT_TYPE ObjectType;
|
---|
| 72 | LPSTR ObjectTypeName;
|
---|
| 73 | LPSTR InheritedObjectTypeName;
|
---|
| 74 | LPSTR ptstrName;
|
---|
| 75 | } OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
|
---|
| 76 |
|
---|
| 77 | typedef struct _OBJECTS_AND_NAME_W {
|
---|
| 78 | DWORD ObjectsPresent;
|
---|
| 79 | SE_OBJECT_TYPE ObjectType;
|
---|
| 80 | LPWSTR ObjectTypeName;
|
---|
| 81 | LPWSTR InheritedObjectTypeName;
|
---|
| 82 | LPWSTR ptstrName;
|
---|
| 83 | } OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
|
---|
| 84 |
|
---|
| 85 | __MINGW_TYPEDEF_AW(OBJECTS_AND_NAME_)
|
---|
| 86 | __MINGW_TYPEDEF_AW(POBJECTS_AND_NAME_)
|
---|
| 87 |
|
---|
| 88 | typedef struct _TRUSTEE_A {
|
---|
| 89 | struct _TRUSTEE_A *pMultipleTrustee;
|
---|
| 90 | MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
|
---|
| 91 | TRUSTEE_FORM TrusteeForm;
|
---|
| 92 | TRUSTEE_TYPE TrusteeType;
|
---|
| 93 | #ifdef __WIDL__
|
---|
| 94 | [switch_is (TrusteeForm)] union {
|
---|
| 95 | [case (TRUSTEE_IS_NAME)] LPSTR ptstrName;
|
---|
| 96 | [case (TRUSTEE_IS_SID)] SID *pSid;
|
---|
| 97 | [case (TRUSTEE_IS_OBJECTS_AND_SID)] OBJECTS_AND_SID *pObjectsAndSid;
|
---|
| 98 | [case (TRUSTEE_IS_OBJECTS_AND_NAME)] OBJECTS_AND_NAME_A *pObjectsAndName;
|
---|
| 99 | };
|
---|
| 100 | #else
|
---|
| 101 | LPSTR ptstrName;
|
---|
| 102 | #endif
|
---|
| 103 | } TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
|
---|
| 104 |
|
---|
| 105 | typedef struct _TRUSTEE_W {
|
---|
| 106 | struct _TRUSTEE_W *pMultipleTrustee;
|
---|
| 107 | MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
|
---|
| 108 | TRUSTEE_FORM TrusteeForm;
|
---|
| 109 | TRUSTEE_TYPE TrusteeType;
|
---|
| 110 | #ifdef __WIDL__
|
---|
| 111 | [switch_is (TrusteeForm)] union {
|
---|
| 112 | [case (TRUSTEE_IS_NAME)] LPWSTR ptstrName;
|
---|
| 113 | [case (TRUSTEE_IS_SID)] SID *pSid;
|
---|
| 114 | [case (TRUSTEE_IS_OBJECTS_AND_SID)] OBJECTS_AND_SID *pObjectsAndSid;
|
---|
| 115 | [case (TRUSTEE_IS_OBJECTS_AND_NAME)] OBJECTS_AND_NAME_W *pObjectsAndName;
|
---|
| 116 | };
|
---|
| 117 | #else
|
---|
| 118 | LPWSTR ptstrName;
|
---|
| 119 | #endif
|
---|
| 120 | } TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
|
---|
| 121 |
|
---|
| 122 | __MINGW_TYPEDEF_AW(TRUSTEE_)
|
---|
| 123 | __MINGW_TYPEDEF_AW(PTRUSTEE_)
|
---|
| 124 | __MINGW_TYPEDEF_AW(TRUSTEE)
|
---|
| 125 | __MINGW_TYPEDEF_AW(PTRUSTEE)
|
---|
| 126 |
|
---|
| 127 | 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;
|
---|
| 136 |
|
---|
| 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 |
|
---|
| 145 | #define INHERITED_PARENT 0x10000000
|
---|
| 146 | #define INHERITED_GRANDPARENT 0x20000000
|
---|
| 147 |
|
---|
| 148 | 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;
|
---|
| 154 |
|
---|
| 155 | typedef struct _EXPLICIT_ACCESS_W {
|
---|
| 156 | DWORD grfAccessPermissions;
|
---|
| 157 | ACCESS_MODE grfAccessMode;
|
---|
| 158 | DWORD grfInheritance;
|
---|
| 159 | TRUSTEE_W Trustee;
|
---|
| 160 | } EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
|
---|
| 161 |
|
---|
| 162 | __MINGW_TYPEDEF_AW(EXPLICIT_ACCESS_)
|
---|
| 163 | __MINGW_TYPEDEF_AW(PEXPLICIT_ACCESS_)
|
---|
| 164 | __MINGW_TYPEDEF_AW(EXPLICIT_ACCESS)
|
---|
| 165 | __MINGW_TYPEDEF_AW(PEXPLICIT_ACCESS)
|
---|
| 166 |
|
---|
| 167 | #define ACCCTRL_DEFAULT_PROVIDERA "Windows NT Access Provider"
|
---|
| 168 | #define ACCCTRL_DEFAULT_PROVIDERW L"Windows NT Access Provider"
|
---|
| 169 |
|
---|
| 170 | #define ACCCTRL_DEFAULT_PROVIDER __MINGW_NAME_AW(ACCCTRL_DEFAULT_PROVIDER)
|
---|
| 171 |
|
---|
| 172 | typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
|
---|
| 173 | typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
|
---|
| 174 |
|
---|
| 175 | typedef struct _ACTRL_ACCESS_ENTRYA {
|
---|
| 176 | TRUSTEE_A Trustee;
|
---|
| 177 | ULONG fAccessFlags;
|
---|
| 178 | ACCESS_RIGHTS Access;
|
---|
| 179 | ACCESS_RIGHTS ProvSpecificAccess;
|
---|
| 180 | INHERIT_FLAGS Inheritance;
|
---|
| 181 | LPSTR lpInheritProperty;
|
---|
| 182 | } ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
|
---|
| 183 |
|
---|
| 184 | typedef struct _ACTRL_ACCESS_ENTRYW {
|
---|
| 185 | TRUSTEE_W Trustee;
|
---|
| 186 | ULONG fAccessFlags;
|
---|
| 187 | ACCESS_RIGHTS Access;
|
---|
| 188 | ACCESS_RIGHTS ProvSpecificAccess;
|
---|
| 189 | INHERIT_FLAGS Inheritance;
|
---|
| 190 | LPWSTR lpInheritProperty;
|
---|
| 191 | } ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
|
---|
| 192 |
|
---|
| 193 | __MINGW_TYPEDEF_AW(ACTRL_ACCESS_ENTRY)
|
---|
| 194 | __MINGW_TYPEDEF_AW(PACTRL_ACCESS_ENTRY)
|
---|
| 195 |
|
---|
| 196 | typedef struct _ACTRL_ACCESS_ENTRY_LISTA {
|
---|
| 197 | ULONG cEntries;
|
---|
| 198 | #ifdef __WIDL__
|
---|
| 199 | [size_is (cEntries)]
|
---|
| 200 | #endif
|
---|
| 201 | ACTRL_ACCESS_ENTRYA *pAccessList;
|
---|
| 202 | } ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
|
---|
| 203 |
|
---|
| 204 | typedef struct _ACTRL_ACCESS_ENTRY_LISTW {
|
---|
| 205 | ULONG cEntries;
|
---|
| 206 | #ifdef __WIDL__
|
---|
| 207 | [size_is (cEntries)]
|
---|
| 208 | #endif
|
---|
| 209 | ACTRL_ACCESS_ENTRYW *pAccessList;
|
---|
| 210 | } ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
|
---|
| 211 |
|
---|
| 212 | __MINGW_TYPEDEF_AW(ACTRL_ACCESS_ENTRY_LIST)
|
---|
| 213 | __MINGW_TYPEDEF_AW(PACTRL_ACCESS_ENTRY_LIST)
|
---|
| 214 |
|
---|
| 215 | typedef struct _ACTRL_PROPERTY_ENTRYA {
|
---|
| 216 | LPSTR lpProperty;
|
---|
| 217 | PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
|
---|
| 218 | ULONG fListFlags;
|
---|
| 219 | } ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
|
---|
| 220 |
|
---|
| 221 | typedef struct _ACTRL_PROPERTY_ENTRYW {
|
---|
| 222 | LPWSTR lpProperty;
|
---|
| 223 | PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
|
---|
| 224 | ULONG fListFlags;
|
---|
| 225 | } ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
|
---|
| 226 |
|
---|
| 227 | __MINGW_TYPEDEF_AW(ACTRL_PROPERTY_ENTRY)
|
---|
| 228 | __MINGW_TYPEDEF_AW(PACTRL_PROPERTY_ENTRY)
|
---|
| 229 |
|
---|
| 230 | typedef struct _ACTRL_ALISTA {
|
---|
| 231 | ULONG cEntries;
|
---|
| 232 | #ifdef __WIDL__
|
---|
| 233 | [size_is (cEntries)]
|
---|
| 234 | #endif
|
---|
| 235 | PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
|
---|
| 236 | } ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
|
---|
| 237 |
|
---|
| 238 | typedef struct _ACTRL_ALISTW {
|
---|
| 239 | ULONG cEntries;
|
---|
| 240 | #ifdef __WIDL__
|
---|
| 241 | [size_is (cEntries)]
|
---|
| 242 | #endif
|
---|
| 243 | PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
|
---|
| 244 | } ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
|
---|
| 245 |
|
---|
| 246 | __MINGW_TYPEDEF_AW(ACTRL_ACCESS)
|
---|
| 247 | __MINGW_TYPEDEF_AW(PACTRL_ACCESS)
|
---|
| 248 | __MINGW_TYPEDEF_AW(ACTRL_AUDIT)
|
---|
| 249 | __MINGW_TYPEDEF_AW(PACTRL_AUDIT)
|
---|
| 250 |
|
---|
| 251 | #define TRUSTEE_ACCESS_ALLOWED __MSABI_LONG(0x1)
|
---|
| 252 | #define TRUSTEE_ACCESS_READ __MSABI_LONG(0x2)
|
---|
| 253 | #define TRUSTEE_ACCESS_WRITE __MSABI_LONG(0x4)
|
---|
| 254 | #define TRUSTEE_ACCESS_EXPLICIT __MSABI_LONG(0x1)
|
---|
| 255 | #define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ | TRUSTEE_ACCESS_WRITE)
|
---|
| 256 |
|
---|
| 257 | #define TRUSTEE_ACCESS_ALL __MSABI_LONG(0xffffffff)
|
---|
| 258 |
|
---|
| 259 | typedef struct _TRUSTEE_ACCESSA {
|
---|
| 260 | LPSTR lpProperty;
|
---|
| 261 | ACCESS_RIGHTS Access;
|
---|
| 262 | ULONG fAccessFlags;
|
---|
| 263 | ULONG fReturnedAccess;
|
---|
| 264 | } TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
|
---|
| 265 |
|
---|
| 266 | typedef struct _TRUSTEE_ACCESSW {
|
---|
| 267 | LPWSTR lpProperty;
|
---|
| 268 | ACCESS_RIGHTS Access;
|
---|
| 269 | ULONG fAccessFlags;
|
---|
| 270 | ULONG fReturnedAccess;
|
---|
| 271 | } TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
|
---|
| 272 |
|
---|
| 273 | __MINGW_TYPEDEF_AW(TRUSTEE_ACCESS)
|
---|
| 274 | __MINGW_TYPEDEF_AW(PTRUSTEE_ACCESS)
|
---|
| 275 |
|
---|
| 276 | #define ACTRL_RESERVED 0x00000000
|
---|
| 277 | #define ACTRL_PERM_1 0x00000001
|
---|
| 278 | #define ACTRL_PERM_2 0x00000002
|
---|
| 279 | #define ACTRL_PERM_3 0x00000004
|
---|
| 280 | #define ACTRL_PERM_4 0x00000008
|
---|
| 281 | #define ACTRL_PERM_5 0x00000010
|
---|
| 282 | #define ACTRL_PERM_6 0x00000020
|
---|
| 283 | #define ACTRL_PERM_7 0x00000040
|
---|
| 284 | #define ACTRL_PERM_8 0x00000080
|
---|
| 285 | #define ACTRL_PERM_9 0x00000100
|
---|
| 286 | #define ACTRL_PERM_10 0x00000200
|
---|
| 287 | #define ACTRL_PERM_11 0x00000400
|
---|
| 288 | #define ACTRL_PERM_12 0x00000800
|
---|
| 289 | #define ACTRL_PERM_13 0x00001000
|
---|
| 290 | #define ACTRL_PERM_14 0x00002000
|
---|
| 291 | #define ACTRL_PERM_15 0x00004000
|
---|
| 292 | #define ACTRL_PERM_16 0x00008000
|
---|
| 293 | #define ACTRL_PERM_17 0x00010000
|
---|
| 294 | #define ACTRL_PERM_18 0x00020000
|
---|
| 295 | #define ACTRL_PERM_19 0x00040000
|
---|
| 296 | #define ACTRL_PERM_20 0x00080000
|
---|
| 297 |
|
---|
| 298 | #define ACTRL_ACCESS_ALLOWED 0x00000001
|
---|
| 299 | #define ACTRL_ACCESS_DENIED 0x00000002
|
---|
| 300 | #define ACTRL_AUDIT_SUCCESS 0x00000004
|
---|
| 301 | #define ACTRL_AUDIT_FAILURE 0x00000008
|
---|
| 302 |
|
---|
| 303 | #define ACTRL_ACCESS_PROTECTED 0x00000001
|
---|
| 304 |
|
---|
| 305 | #define ACTRL_SYSTEM_ACCESS 0x04000000
|
---|
| 306 | #define ACTRL_DELETE 0x08000000
|
---|
| 307 | #define ACTRL_READ_CONTROL 0x10000000
|
---|
| 308 | #define ACTRL_CHANGE_ACCESS 0x20000000
|
---|
| 309 | #define ACTRL_CHANGE_OWNER 0x40000000
|
---|
| 310 | #define ACTRL_SYNCHRONIZE 0x80000000
|
---|
| 311 | #define ACTRL_STD_RIGHTS_ALL 0xf8000000
|
---|
| 312 | #define ACTRL_STD_RIGHT_REQUIRED (ACTRL_STD_RIGHTS_ALL & ~ACTRL_SYNCHRONIZE)
|
---|
| 313 |
|
---|
| 314 | #ifndef _DS_CONTROL_BITS_DEFINED_
|
---|
| 315 | #define _DS_CONTROL_BITS_DEFINED_
|
---|
| 316 |
|
---|
| 317 | #define ACTRL_DS_OPEN ACTRL_RESERVED
|
---|
| 318 | #define ACTRL_DS_CREATE_CHILD ACTRL_PERM_1
|
---|
| 319 | #define ACTRL_DS_DELETE_CHILD ACTRL_PERM_2
|
---|
| 320 | #define ACTRL_DS_LIST ACTRL_PERM_3
|
---|
| 321 | #define ACTRL_DS_SELF ACTRL_PERM_4
|
---|
| 322 | #define ACTRL_DS_READ_PROP ACTRL_PERM_5
|
---|
| 323 | #define ACTRL_DS_WRITE_PROP ACTRL_PERM_6
|
---|
| 324 | #define ACTRL_DS_DELETE_TREE ACTRL_PERM_7
|
---|
| 325 | #define ACTRL_DS_LIST_OBJECT ACTRL_PERM_8
|
---|
| 326 | #define ACTRL_DS_CONTROL_ACCESS ACTRL_PERM_9
|
---|
| 327 | #endif
|
---|
| 328 |
|
---|
| 329 | #define ACTRL_FILE_READ ACTRL_PERM_1
|
---|
| 330 | #define ACTRL_FILE_WRITE ACTRL_PERM_2
|
---|
| 331 | #define ACTRL_FILE_APPEND ACTRL_PERM_3
|
---|
| 332 | #define ACTRL_FILE_READ_PROP ACTRL_PERM_4
|
---|
| 333 | #define ACTRL_FILE_WRITE_PROP ACTRL_PERM_5
|
---|
| 334 | #define ACTRL_FILE_EXECUTE ACTRL_PERM_6
|
---|
| 335 | #define ACTRL_FILE_READ_ATTRIB ACTRL_PERM_8
|
---|
| 336 | #define ACTRL_FILE_WRITE_ATTRIB ACTRL_PERM_9
|
---|
| 337 | #define ACTRL_FILE_CREATE_PIPE ACTRL_PERM_10
|
---|
| 338 | #define ACTRL_DIR_LIST ACTRL_PERM_1
|
---|
| 339 | #define ACTRL_DIR_CREATE_OBJECT ACTRL_PERM_2
|
---|
| 340 | #define ACTRL_DIR_CREATE_CHILD ACTRL_PERM_3
|
---|
| 341 | #define ACTRL_DIR_DELETE_CHILD ACTRL_PERM_7
|
---|
| 342 | #define ACTRL_DIR_TRAVERSE ACTRL_PERM_6
|
---|
| 343 | #define ACTRL_KERNEL_TERMINATE ACTRL_PERM_1
|
---|
| 344 | #define ACTRL_KERNEL_THREAD ACTRL_PERM_2
|
---|
| 345 | #define ACTRL_KERNEL_VM ACTRL_PERM_3
|
---|
| 346 | #define ACTRL_KERNEL_VM_READ ACTRL_PERM_4
|
---|
| 347 | #define ACTRL_KERNEL_VM_WRITE ACTRL_PERM_5
|
---|
| 348 | #define ACTRL_KERNEL_DUP_HANDLE ACTRL_PERM_6
|
---|
| 349 | #define ACTRL_KERNEL_PROCESS ACTRL_PERM_7
|
---|
| 350 | #define ACTRL_KERNEL_SET_INFO ACTRL_PERM_8
|
---|
| 351 | #define ACTRL_KERNEL_GET_INFO ACTRL_PERM_9
|
---|
| 352 | #define ACTRL_KERNEL_CONTROL ACTRL_PERM_10
|
---|
| 353 | #define ACTRL_KERNEL_ALERT ACTRL_PERM_11
|
---|
| 354 | #define ACTRL_KERNEL_GET_CONTEXT ACTRL_PERM_12
|
---|
| 355 | #define ACTRL_KERNEL_SET_CONTEXT ACTRL_PERM_13
|
---|
| 356 | #define ACTRL_KERNEL_TOKEN ACTRL_PERM_14
|
---|
| 357 | #define ACTRL_KERNEL_IMPERSONATE ACTRL_PERM_15
|
---|
| 358 | #define ACTRL_KERNEL_DIMPERSONATE ACTRL_PERM_16
|
---|
| 359 | #define ACTRL_PRINT_SADMIN ACTRL_PERM_1
|
---|
| 360 | #define ACTRL_PRINT_SLIST ACTRL_PERM_2
|
---|
| 361 | #define ACTRL_PRINT_PADMIN ACTRL_PERM_3
|
---|
| 362 | #define ACTRL_PRINT_PUSE ACTRL_PERM_4
|
---|
| 363 | #define ACTRL_PRINT_JADMIN ACTRL_PERM_5
|
---|
| 364 | #define ACTRL_SVC_GET_INFO ACTRL_PERM_1
|
---|
| 365 | #define ACTRL_SVC_SET_INFO ACTRL_PERM_2
|
---|
| 366 | #define ACTRL_SVC_STATUS ACTRL_PERM_3
|
---|
| 367 | #define ACTRL_SVC_LIST ACTRL_PERM_4
|
---|
| 368 | #define ACTRL_SVC_START ACTRL_PERM_5
|
---|
| 369 | #define ACTRL_SVC_STOP ACTRL_PERM_6
|
---|
| 370 | #define ACTRL_SVC_PAUSE ACTRL_PERM_7
|
---|
| 371 | #define ACTRL_SVC_INTERROGATE ACTRL_PERM_8
|
---|
| 372 | #define ACTRL_SVC_UCONTROL ACTRL_PERM_9
|
---|
| 373 | #define ACTRL_REG_QUERY ACTRL_PERM_1
|
---|
| 374 | #define ACTRL_REG_SET ACTRL_PERM_2
|
---|
| 375 | #define ACTRL_REG_CREATE_CHILD ACTRL_PERM_3
|
---|
| 376 | #define ACTRL_REG_LIST ACTRL_PERM_4
|
---|
| 377 | #define ACTRL_REG_NOTIFY ACTRL_PERM_5
|
---|
| 378 | #define ACTRL_REG_LINK ACTRL_PERM_6
|
---|
| 379 | #define ACTRL_WIN_CLIPBRD ACTRL_PERM_1
|
---|
| 380 | #define ACTRL_WIN_GLOBAL_ATOMS ACTRL_PERM_2
|
---|
| 381 | #define ACTRL_WIN_CREATE ACTRL_PERM_3
|
---|
| 382 | #define ACTRL_WIN_LIST_DESK ACTRL_PERM_4
|
---|
| 383 | #define ACTRL_WIN_LIST ACTRL_PERM_5
|
---|
| 384 | #define ACTRL_WIN_READ_ATTRIBS ACTRL_PERM_6
|
---|
| 385 | #define ACTRL_WIN_WRITE_ATTRIBS ACTRL_PERM_7
|
---|
| 386 | #define ACTRL_WIN_SCREEN ACTRL_PERM_8
|
---|
| 387 | #define ACTRL_WIN_EXIT ACTRL_PERM_9
|
---|
| 388 |
|
---|
| 389 | typedef struct _ACTRL_OVERLAPPED {
|
---|
| 390 | __C89_NAMELESS union {
|
---|
| 391 | PVOID Provider;
|
---|
| 392 | ULONG Reserved1;
|
---|
| 393 | } DUMMYUNIONNAME;
|
---|
| 394 | ULONG Reserved2;
|
---|
| 395 | HANDLE hEvent;
|
---|
| 396 | } ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
|
---|
| 397 |
|
---|
| 398 | typedef struct _ACTRL_ACCESS_INFOA {
|
---|
| 399 | ULONG fAccessPermission;
|
---|
| 400 | LPSTR lpAccessPermissionName;
|
---|
| 401 | } ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
|
---|
| 402 |
|
---|
| 403 | typedef struct _ACTRL_ACCESS_INFOW {
|
---|
| 404 | ULONG fAccessPermission;
|
---|
| 405 | LPWSTR lpAccessPermissionName;
|
---|
| 406 | } ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
|
---|
| 407 |
|
---|
| 408 | __MINGW_TYPEDEF_AW(ACTRL_ACCESS_INFO)
|
---|
| 409 | __MINGW_TYPEDEF_AW(PACTRL_ACCESS_INFO)
|
---|
| 410 |
|
---|
| 411 | typedef struct _ACTRL_CONTROL_INFOA {
|
---|
| 412 | LPSTR lpControlId;
|
---|
| 413 | LPSTR lpControlName;
|
---|
| 414 | } ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
|
---|
| 415 |
|
---|
| 416 | typedef struct _ACTRL_CONTROL_INFOW {
|
---|
| 417 | LPWSTR lpControlId;
|
---|
| 418 | LPWSTR lpControlName;
|
---|
| 419 | } ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
|
---|
| 420 |
|
---|
| 421 | __MINGW_TYPEDEF_AW(ACTRL_CONTROL_INFO)
|
---|
| 422 | __MINGW_TYPEDEF_AW(PACTRL_CONTROL_INFO)
|
---|
| 423 |
|
---|
| 424 | #define ACTRL_ACCESS_NO_OPTIONS 0x0
|
---|
| 425 | #define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x1
|
---|
| 426 |
|
---|
| 427 | #if NTDDI_VERSION >= 0x06000000
|
---|
| 428 | #define TREE_SEC_INFO_SET 0x00000001
|
---|
| 429 | #define TREE_SEC_INFO_RESET 0x00000002
|
---|
| 430 | #define TREE_SEC_INFO_RESET_KEEP_EXPLICIT 0x00000003
|
---|
| 431 | #endif
|
---|
| 432 |
|
---|
| 433 | typedef enum _PROGRESS_INVOKE_SETTING {
|
---|
| 434 | ProgressInvokeNever = 1, ProgressInvokeEveryObject, ProgressInvokeOnError, ProgressCancelOperation, ProgressRetryOperation
|
---|
| 435 | #if NTDDI_VERSION >= 0x06000000
|
---|
| 436 | , ProgressInvokePrePostError
|
---|
| 437 | #endif
|
---|
| 438 | } PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
|
---|
| 439 |
|
---|
| 440 | typedef struct _FN_OBJECT_MGR_FUNCTIONS {
|
---|
| 441 | ULONG Placeholder;
|
---|
| 442 | } FN_OBJECT_MGR_FUNCTS, *PFN_OBJECT_MGR_FUNCTS;
|
---|
| 443 |
|
---|
| 444 | typedef struct _INHERITED_FROMA {
|
---|
| 445 | LONG GenerationGap;
|
---|
| 446 | LPSTR AncestorName;
|
---|
| 447 | } INHERITED_FROMA, *PINHERITED_FROMA;
|
---|
| 448 |
|
---|
| 449 | typedef struct _INHERITED_FROMW {
|
---|
| 450 | LONG GenerationGap;
|
---|
| 451 | LPWSTR AncestorName;
|
---|
| 452 | } INHERITED_FROMW, *PINHERITED_FROMW;
|
---|
| 453 |
|
---|
| 454 | __MINGW_TYPEDEF_AW(INHERITED_FROM)
|
---|
| 455 | __MINGW_TYPEDEF_AW(PINHERITED_FROM)
|
---|
| 456 | #endif
|
---|
| 457 |
|
---|
| 458 | #ifdef __cplusplus
|
---|
| 459 | }
|
---|
| 460 | #endif
|
---|
| 461 | #endif
|
---|