update for HEAD-2003091401
[reactos.git] / include / aclapi.h
1 /*
2         aclapi.h
3
4         This file is part of a free library for the Win32 API.
5
6         This library is distributed in the hope that it will be useful,
7         but WITHOUT ANY WARRANTY; without even the implied warranty of
8         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10 */
11 #ifndef _ACLAPI_H
12 #define _ACLAPI_H
13
14 #include <windows.h>
15 #include <accctrl.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 typedef VOID (*FN_PROGRESS) (LPWSTR pObjectName,DWORD Status,PPROG_INVOKE_SETTING pInvokeSetting,PVOID Args,WINBOOL SecuritySet);
21
22 VOID STDCALL BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess,LPSTR pTrusteeName,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
23 VOID STDCALL BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess,LPWSTR pTrusteeName,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
24 DWORD STDCALL BuildSecurityDescriptorA(PTRUSTEE_A pOwner,PTRUSTEE_A pGroup,ULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_A pListOfAccessEntries,
25  ULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_A pListOfAuditEntries,PSECURITY_DESCRIPTOR pOldSD,PULONG pSizeNewSD,PSECURITY_DESCRIPTOR* pNewSD);
26 DWORD STDCALL BuildSecurityDescriptorW(PTRUSTEE_W pOwner,PTRUSTEE_W pGroup,ULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_W pListOfAccessEntries,
27  ULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_W pListOfAuditEntries,PSECURITY_DESCRIPTOR pOldSD,PULONG pSizeNewSD,PSECURITY_DESCRIPTOR* pNewSD);
28 VOID STDCALL BuildTrusteeWithNameA(PTRUSTEE_A pTrustee,LPSTR pName);
29 VOID STDCALL BuildTrusteeWithNameW(PTRUSTEE_W pTrustee,LPWSTR pName);
30 VOID STDCALL BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A pTrustee,POBJECTS_AND_NAME_A pObjName,SE_OBJECT_TYPE ObjectType,
31  LPSTR ObjectTypeName,LPSTR InheritedObjectTypeName,LPSTR Name);
32 VOID STDCALL BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W pTrustee,POBJECTS_AND_NAME_W pObjName,SE_OBJECT_TYPE ObjectType,
33  LPWSTR ObjectTypeName,LPWSTR InheritedObjectTypeName,LPWSTR Name);
34 VOID STDCALL BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A pTrustee,POBJECTS_AND_SID pObjSid,GUID* pObjectGuid,GUID* pInheritedObjectGuid,PSID pSid);
35 VOID STDCALL BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W pTrustee,POBJECTS_AND_SID pObjSid,GUID* pObjectGuid,GUID* pInheritedObjectGuid,PSID pSid);
36 VOID STDCALL BuildTrusteeWithSidA(PTRUSTEE_A pTrustee,PSID pSid);
37 VOID STDCALL BuildTrusteeWithSidW(PTRUSTEE_W pTrustee,PSID pSid);
38 DWORD STDCALL GetAuditedPermissionsFromAclA(PACL pacl,PTRUSTEE_A pTrustee,PACCESS_MASK pSuccessfulAuditedRights,PACCESS_MASK pFailedAuditRights);
39 DWORD STDCALL GetAuditedPermissionsFromAclW(PACL pacl,PTRUSTEE_W pTrustee,PACCESS_MASK pSuccessfulAuditedRights,PACCESS_MASK pFailedAuditRights);
40 DWORD STDCALL GetEffectiveRightsFromAclA(PACL pacl,PTRUSTEE_A pTrustee,PACCESS_MASK pAccessRights);
41 DWORD STDCALL GetEffectiveRightsFromAclW(PACL pacl,PTRUSTEE_W pTrustee,PACCESS_MASK pAccessRights);
42 DWORD STDCALL GetExplicitEntriesFromAclA(PACL pacl,PULONG pcCountOfExplicitEntries,PEXPLICIT_ACCESS_A* pListOfExplicitEntries);
43 DWORD STDCALL GetExplicitEntriesFromAclW(PACL pacl,PULONG pcCountOfExplicitEntries,PEXPLICIT_ACCESS_W* pListOfExplicitEntries);
44 DWORD STDCALL GetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
45  PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
46 DWORD STDCALL GetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
47  PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
48 DWORD STDCALL GetSecurityInfo(HANDLE handle,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
49  PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
50 TRUSTEE_FORM STDCALL GetTrusteeFormA(PTRUSTEE_A pTrustee);
51 TRUSTEE_FORM STDCALL GetTrusteeFormW(PTRUSTEE_W pTrustee);
52 LPSTR STDCALL GetTrusteeNameA(PTRUSTEE_A pTrustee);
53 LPWSTR STDCALL GetTrusteeNameW(PTRUSTEE_W pTrustee);
54 TRUSTEE_TYPE STDCALL GetTrusteeTypeA(PTRUSTEE_A pTrustee);
55 TRUSTEE_TYPE STDCALL GetTrusteeTypeW(PTRUSTEE_W pTrustee);
56 DWORD STDCALL LookupSecurityDescriptorPartsA(PTRUSTEE_A* pOwner,PTRUSTEE_A* pGroup,PULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_A* pListOfAccessEntries,
57  PULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_A* pListOfAuditEntries,PSECURITY_DESCRIPTOR pSD);
58 DWORD STDCALL LookupSecurityDescriptorPartsW(PTRUSTEE_W* pOwner,PTRUSTEE_W* pGroup,PULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_W* pListOfAccessEntries,
59  PULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_W* pListOfAuditEntries,PSECURITY_DESCRIPTOR pSD);
60 DWORD STDCALL SetEntriesInAclA(ULONG cCountOfExplicitEntries,PEXPLICIT_ACCESS_A pListOfExplicitEntries,PACL OldAcl,PACL* NewAcl);
61 DWORD STDCALL SetEntriesInAclW(ULONG cCountOfExplicitEntries,PEXPLICIT_ACCESS_W pListOfExplicitEntries,PACL OldAcl,PACL* NewAcl);
62 DWORD STDCALL SetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
63 DWORD STDCALL SetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
64 DWORD STDCALL SetSecurityInfo(HANDLE handle,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
65 DWORD STDCALL GetInheritanceSourceA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,WINBOOL Container,GUID ** pObjectClassGuids ,DWORD GuidCount,PACL pAcl,PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL,PGENERIC_MAPPING pGenericMapping,PINHERITED_FROMA pInheritArray);
66 DWORD STDCALL GetInheritanceSourceW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,WINBOOL Container,GUID ** pObjectClassGuids ,DWORD GuidCount,PACL pAcl,PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL,PGENERIC_MAPPING pGenericMapping,PINHERITED_FROMW pInheritArray);
67 DWORD STDCALL FreeInheritedFromArray(PINHERITED_FROMW pInheritArray,USHORT AceCnt,PFN_OBJECT_MGR_FUNCTS pfnArray);
68 DWORD STDCALL TreeResetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID pOwner,PSID pGroup,PACL pDacl,PACL pSacl,WINBOOL KeepExplicit,FN_PROGRESS fnProgress,PROG_INVOKE_SETTING ProgressInvokeSetting,PVOID Args);
69 DWORD STDCALL TreeResetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID pOwner,PSID pGroup,PACL pDacl,PACL pSacl,WINBOOL KeepExplicit,FN_PROGRESS fnProgress,PROG_INVOKE_SETTING ProgressInvokeSetting,PVOID Args);
70 VOID STDCALL BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess,LPSTR pTrusteeName,PTRUSTEE_A pTrustee,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
71 VOID STDCALL BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess,LPWSTR pTrusteeName,PTRUSTEE_W pTrustee,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
72 VOID STDCALL BuildImpersonateTrusteeA(PTRUSTEE_A pTrustee,PTRUSTEE_A pImpersonateTrustee);
73 VOID STDCALL BuildImpersonateTrusteeW(PTRUSTEE_W pTrustee,PTRUSTEE_W pImpersonateTrustee);
74 MULTIPLE_TRUSTEE_OPERATION STDCALL GetMultipleTrusteeOperationA(PTRUSTEE_A pTrustee);
75 MULTIPLE_TRUSTEE_OPERATION STDCALL GetMultipleTrusteeOperationW(PTRUSTEE_W pTrustee);
76 PTRUSTEE_A STDCALL GetMultipleTrusteeA(PTRUSTEE_A pTrustee);
77 PTRUSTEE_W STDCALL GetMultipleTrusteeW(PTRUSTEE_W pTrustee);
78
79 #ifndef _DISABLE_TIDENTS
80 #ifdef UNICODE
81 #define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
82 #define BuildSecurityDescriptor BuildSecurityDescriptorW
83 #define BuildTrusteeWithName BuildTrusteeWithNameW
84 #define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
85 #define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
86 #define BuildTrusteeWithSid BuildTrusteeWithSidW
87 #define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
88 #define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
89 #define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
90 #define GetNamedSecurityInfo GetNamedSecurityInfoW
91 #define GetTrusteeForm GetTrusteeFormW
92 #define GetTrusteeName GetTrusteeNameW
93 #define GetTrusteeType GetTrusteeTypeW
94 #define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
95 #define SetEntriesInAcl SetEntriesInAclW
96 #define SetNamedSecurityInfo SetNamedSecurityInfoW
97 #define GetInheritanceSource GetInheritanceSourceW
98 #define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoW
99 #define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
100 #define BuildImpersonateTrustee BuildImpersonateTrusteeW
101 #define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
102 #define GetMultipleTrustee GetMultipleTrusteeW
103 #else
104 #define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
105 #define BuildSecurityDescriptor BuildSecurityDescriptorA
106 #define BuildTrusteeWithName BuildTrusteeWithNameA
107 #define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
108 #define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
109 #define BuildTrusteeWithSid BuildTrusteeWithSidA
110 #define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
111 #define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
112 #define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
113 #define GetNamedSecurityInfo GetNamedSecurityInfoA
114 #define GetTrusteeForm GetTrusteeFormA
115 #define GetTrusteeName GetTrusteeNameA
116 #define GetTrusteeType GetTrusteeTypeA
117 #define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
118 #define SetEntriesInAcl SetEntriesInAclA
119 #define SetNamedSecurityInfo SetNamedSecurityInfoA
120 #define GetInheritanceSource GetInheritanceSourceA
121 #define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoA
122 #define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
123 #define BuildImpersonateTrustee BuildImpersonateTrusteeA
124 #define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
125 #define GetMultipleTrustee GetMultipleTrusteeA
126 #endif /* UNICODE */
127 #endif
128
129 #ifdef __cplusplus
130 }
131 #endif
132 #endif