"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/import/core/sys/windows/aclapi.d" (20 Nov 2020, 7042 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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