1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * Authors: Stewart Gordon 7 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 8 * Source: $(DRUNTIMESRC core/sys/windows/_aclapi.d) 9 */ 10 /// Automatically imported and edited from the druntime module 11 /// core.sys.windows.aclapi for the auto-generated win32 package. 12 module win32.aclapi; 13 //version (Windows): 14 @system: 15 16 version (ANSI) {} else version = Unicode; 17 version (Win32_UseLib) pragma(lib, "advapi32"); 18 19 import win32.accctrl, win32.basetyps, win32.w32api, win32.winnt; 20 21 extern (Windows) { 22 VOID BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A, LPSTR, DWORD, 23 ACCESS_MODE, DWORD); 24 VOID BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W, LPWSTR, DWORD, 25 ACCESS_MODE, DWORD); 26 DWORD BuildSecurityDescriptorA(PTRUSTEE_A, PTRUSTEE_A , ULONG, 27 PEXPLICIT_ACCESS_A, ULONG, PEXPLICIT_ACCESS_A, PSECURITY_DESCRIPTOR, 28 PULONG, PSECURITY_DESCRIPTOR*); 29 DWORD BuildSecurityDescriptorW(PTRUSTEE_W, PTRUSTEE_W , ULONG, 30 PEXPLICIT_ACCESS_W, ULONG, PEXPLICIT_ACCESS_W, PSECURITY_DESCRIPTOR, 31 PULONG, PSECURITY_DESCRIPTOR*); 32 VOID BuildTrusteeWithNameA(PTRUSTEE_A, LPSTR); 33 VOID BuildTrusteeWithNameW(PTRUSTEE_W, LPWSTR); 34 VOID BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A, POBJECTS_AND_NAME_A, 35 SE_OBJECT_TYPE, LPSTR, LPSTR, LPSTR); 36 VOID BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W, POBJECTS_AND_NAME_W, 37 SE_OBJECT_TYPE, LPWSTR, LPWSTR, LPWSTR); 38 VOID BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A, POBJECTS_AND_SID, 39 GUID*, GUID*, PSID); 40 VOID BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W, POBJECTS_AND_SID, 41 GUID*, GUID*, PSID); 42 VOID BuildTrusteeWithSidA(PTRUSTEE_A, PSID); 43 VOID BuildTrusteeWithSidW(PTRUSTEE_W, PSID); 44 DWORD GetAuditedPermissionsFromAclA(PACL, PTRUSTEE_A, PACCESS_MASK, 45 PACCESS_MASK); 46 DWORD GetAuditedPermissionsFromAclW(PACL, PTRUSTEE_W, PACCESS_MASK, 47 PACCESS_MASK); 48 DWORD GetEffectiveRightsFromAclA(PACL, PTRUSTEE_A, PACCESS_MASK); 49 DWORD GetEffectiveRightsFromAclW(PACL, PTRUSTEE_W, PACCESS_MASK); 50 DWORD GetExplicitEntriesFromAclA(PACL, PULONG, PEXPLICIT_ACCESS_A*); 51 DWORD GetExplicitEntriesFromAclW(PACL, PULONG, PEXPLICIT_ACCESS_W*); 52 static if (_WIN32_WINNT >= 0x501) { 53 DWORD GetInheritanceSourceA(LPSTR, SE_OBJECT_TYPE, 54 SECURITY_INFORMATION, BOOL, GUID**, DWORD, PACL, void*, 55 PGENERIC_MAPPING, PINHERITED_FROMA); 56 DWORD GetInheritanceSourceW(LPWSTR, SE_OBJECT_TYPE, 57 SECURITY_INFORMATION, BOOL, GUID**, DWORD, PACL, void*, 58 PGENERIC_MAPPING, PINHERITED_FROMW); 59 } 60 DWORD GetNamedSecurityInfoA(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, 61 PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); 62 DWORD GetNamedSecurityInfoW(LPWSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, 63 PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); 64 DWORD GetSecurityInfo(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, 65 PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); 66 TRUSTEE_FORM GetTrusteeFormA(PTRUSTEE_A); 67 TRUSTEE_FORM GetTrusteeFormW(PTRUSTEE_W); 68 LPSTR GetTrusteeNameA(PTRUSTEE_A); 69 LPWSTR GetTrusteeNameW(PTRUSTEE_W); 70 TRUSTEE_TYPE GetTrusteeTypeA(PTRUSTEE_A); 71 TRUSTEE_TYPE GetTrusteeTypeW(PTRUSTEE_W); 72 DWORD LookupSecurityDescriptorPartsA(PTRUSTEE_A*, PTRUSTEE_A*, PULONG, 73 PEXPLICIT_ACCESS_A*, PULONG, PEXPLICIT_ACCESS_A*, 74 PSECURITY_DESCRIPTOR); 75 DWORD LookupSecurityDescriptorPartsW(PTRUSTEE_W*, PTRUSTEE_W*, PULONG, 76 PEXPLICIT_ACCESS_W*, PULONG, PEXPLICIT_ACCESS_W*, 77 PSECURITY_DESCRIPTOR); 78 DWORD SetEntriesInAclA(ULONG, PEXPLICIT_ACCESS_A, PACL, PACL*); 79 DWORD SetEntriesInAclW(ULONG, PEXPLICIT_ACCESS_W, PACL, PACL*); 80 DWORD SetNamedSecurityInfoA(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, 81 PSID, PSID, PACL, PACL); 82 DWORD SetNamedSecurityInfoW(LPWSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, 83 PSID, PSID, PACL, PACL); 84 DWORD SetSecurityInfo(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID, 85 PSID, PACL, PACL); 86 VOID BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A, LPSTR, 87 PTRUSTEE_A, DWORD, ACCESS_MODE, DWORD); 88 VOID BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W, LPWSTR, 89 PTRUSTEE_W, DWORD, ACCESS_MODE, DWORD); 90 VOID BuildImpersonateTrusteeA(PTRUSTEE_A, PTRUSTEE_A); 91 VOID BuildImpersonateTrusteeW(PTRUSTEE_W, PTRUSTEE_W); 92 PTRUSTEE_A GetMultipleTrusteeA(PTRUSTEE_A); 93 PTRUSTEE_W GetMultipleTrusteeW(PTRUSTEE_W); 94 MULTIPLE_TRUSTEE_OPERATION GetMultipleTrusteeOperationA(PTRUSTEE_A); 95 MULTIPLE_TRUSTEE_OPERATION GetMultipleTrusteeOperationW(PTRUSTEE_W); 96 } 97 98 version (Unicode) { 99 alias BuildExplicitAccessWithNameW BuildExplicitAccessWithName; 100 alias BuildSecurityDescriptorW BuildSecurityDescriptor; 101 alias BuildTrusteeWithNameW BuildTrusteeWithName; 102 alias BuildTrusteeWithObjectsAndNameW BuildTrusteeWithObjectsAndName; 103 alias BuildTrusteeWithObjectsAndSidW BuildTrusteeWithObjectsAndSid; 104 alias BuildTrusteeWithSidW BuildTrusteeWithSid; 105 alias GetAuditedPermissionsFromAclW GetAuditedPermissionsFromAcl; 106 alias GetEffectiveRightsFromAclW GetEffectiveRightsFromAcl; 107 alias GetExplicitEntriesFromAclW GetExplicitEntriesFromAcl; 108 alias GetNamedSecurityInfoW GetNamedSecurityInfo; 109 alias GetTrusteeFormW GetTrusteeForm; 110 alias GetTrusteeNameW GetTrusteeName; 111 alias GetTrusteeTypeW GetTrusteeType; 112 alias LookupSecurityDescriptorPartsW LookupSecurityDescriptorParts; 113 alias SetEntriesInAclW SetEntriesInAcl; 114 alias SetNamedSecurityInfoW SetNamedSecurityInfo; 115 alias BuildImpersonateExplicitAccessWithNameW 116 BuildImpersonateExplicitAccessWithName; 117 alias BuildImpersonateTrusteeW BuildImpersonateTrustee; 118 alias GetMultipleTrusteeW GetMultipleTrustee; 119 alias GetMultipleTrusteeOperationW GetMultipleTrusteeOperation; 120 } else { 121 alias BuildExplicitAccessWithNameA BuildExplicitAccessWithName; 122 alias BuildSecurityDescriptorA BuildSecurityDescriptor; 123 alias BuildTrusteeWithNameA BuildTrusteeWithName; 124 alias BuildTrusteeWithObjectsAndNameA BuildTrusteeWithObjectsAndName; 125 alias BuildTrusteeWithObjectsAndSidA BuildTrusteeWithObjectsAndSid; 126 alias BuildTrusteeWithSidA BuildTrusteeWithSid; 127 alias GetAuditedPermissionsFromAclA GetAuditedPermissionsFromAcl; 128 alias GetEffectiveRightsFromAclA GetEffectiveRightsFromAcl; 129 alias GetExplicitEntriesFromAclA GetExplicitEntriesFromAcl; 130 alias GetNamedSecurityInfoA GetNamedSecurityInfo; 131 alias GetTrusteeFormA GetTrusteeForm; 132 alias GetTrusteeNameA GetTrusteeName; 133 alias GetTrusteeTypeA GetTrusteeType; 134 alias LookupSecurityDescriptorPartsA LookupSecurityDescriptorParts; 135 alias SetEntriesInAclA SetEntriesInAcl; 136 alias SetNamedSecurityInfoA SetNamedSecurityInfo; 137 alias BuildImpersonateExplicitAccessWithNameA 138 BuildImpersonateExplicitAccessWithName; 139 alias BuildImpersonateTrusteeA BuildImpersonateTrustee; 140 alias GetMultipleTrusteeA GetMultipleTrustee; 141 alias GetMultipleTrusteeOperationA GetMultipleTrusteeOperation; 142 }