[ADVAPI32]
[reactos.git] / reactos / dll / win32 / advapi32 / advapi32.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS System Libraries
4 * FILE: lib/advapi32/advapi32.h
5 * PURPOSE: Win32 Advanced API Libary Header
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8 #ifndef __ADVAPI32_H
9 #define __ADVAPI32_H
10
11 /* INCLUDES ******************************************************************/
12
13 /* C Headers */
14 #include <limits.h>
15 #include <stdio.h>
16
17 /* PSDK/NDK Headers */
18 #define WIN32_NO_STATUS
19 #define _WMI_SOURCE_
20 #include <windows.h>
21 #include <accctrl.h>
22 #include <aclapi.h>
23 #include <wmistr.h>
24 #include <evntrace.h>
25 #include <winsafer.h>
26 #include <sddl.h>
27 #define NTOS_MODE_USER
28 #include <ndk/cmfuncs.h>
29 #include <ndk/exfuncs.h>
30 #include <ndk/iofuncs.h>
31 #include <ndk/kefuncs.h>
32 #include <ndk/obfuncs.h>
33 #include <ndk/psfuncs.h>
34 #include <ndk/rtlfuncs.h>
35 #include <ndk/setypes.h>
36 #include <ndk/sefuncs.h>
37
38 /* this has to go after the NDK when being used with the NDK */
39 #include <ntsecapi.h>
40
41 #include <services/services.h>
42 #include "svcctl_c.h"
43 #include "lsa_c.h"
44 #include "eventlogrpc_c.h"
45
46 #include <rpc.h>
47
48 #include "crypt/crypt.h"
49 #include <wine/debug.h>
50 #include <wine/unicode.h>
51 #include <wincred.h>
52
53 #ifndef HAS_FN_PROGRESSW
54 #define FN_PROGRESSW FN_PROGRESS
55 #endif
56 #ifndef HAS_FN_PROGRESSA
57 #define FN_PROGRESSA FN_PROGRESS
58 #endif
59
60 /* rpc.c */
61
62 RPC_STATUS EvtBindRpc(LPCWSTR pszMachine,
63 RPC_BINDING_HANDLE* BindingHandle);
64 RPC_STATUS EvtUnbindRpc(RPC_BINDING_HANDLE *BindingHandle);
65
66 BOOL
67 EvtGetLocalHandle(RPC_BINDING_HANDLE *BindingHandle);
68 RPC_STATUS EvtUnbindLocalHandle(void);
69
70 /* scm.c */
71 DWORD
72 ScmRpcStatusToWinError(RPC_STATUS Status);
73
74 /* Interface to ntmarta.dll **************************************************/
75
76 typedef struct _NTMARTA
77 {
78 HINSTANCE hDllInstance;
79
80 /* 2CC */PVOID LookupAccountTrustee;
81 /* 2D0 */PVOID LookupAccountName;
82 /* 2D4 */PVOID LookupAccountSid;
83 /* 2D8 */PVOID SetEntriesInAList;
84 /* 2DC */PVOID ConvertAccessToSecurityDescriptor;
85 /* 2E0 */PVOID ConvertSDToAccess;
86 /* 2E4 */PVOID ConvertAclToAccess;
87 /* 2E8 */PVOID GetAccessForTrustee;
88 /* 2EC */PVOID GetExplicitEntries;
89 /* 2F0 */
90 DWORD (WINAPI *RewriteGetNamedRights)(LPWSTR pObjectName,
91 SE_OBJECT_TYPE ObjectType,
92 SECURITY_INFORMATION SecurityInfo,
93 PSID* ppsidOwner,
94 PSID* ppsidGroup,
95 PACL* ppDacl,
96 PACL* ppSacl,
97 PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
98
99 /* 2F4 */
100 DWORD (WINAPI *RewriteSetNamedRights)(LPWSTR pObjectName,
101 SE_OBJECT_TYPE ObjectType,
102 SECURITY_INFORMATION SecurityInfo,
103 PSECURITY_DESCRIPTOR pSecurityDescriptor);
104
105 /*2F8*/
106 DWORD (WINAPI *RewriteGetHandleRights)(HANDLE handle,
107 SE_OBJECT_TYPE ObjectType,
108 SECURITY_INFORMATION SecurityInfo,
109 PSID* ppsidOwner,
110 PSID* ppsidGroup,
111 PACL* ppDacl,
112 PACL* ppSacl,
113 PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
114
115 /* 2FC */
116 DWORD (WINAPI *RewriteSetHandleRights)(HANDLE handle,
117 SE_OBJECT_TYPE ObjectType,
118 SECURITY_INFORMATION SecurityInfo,
119 PSECURITY_DESCRIPTOR pSecurityDescriptor);
120
121 /* 300 */
122 DWORD (WINAPI *RewriteSetEntriesInAcl)(ULONG cCountOfExplicitEntries,
123 PEXPLICIT_ACCESS_W pListOfExplicitEntries,
124 PACL OldAcl,
125 PACL* NewAcl);
126
127 /* 304 */
128 DWORD (WINAPI *RewriteGetExplicitEntriesFromAcl)(PACL pacl,
129 PULONG pcCountOfExplicitEntries,
130 PEXPLICIT_ACCESS_W* pListOfExplicitEntries);
131
132 /* 308 */
133 DWORD (WINAPI *TreeResetNamedSecurityInfo)(LPWSTR pObjectName,
134 SE_OBJECT_TYPE ObjectType,
135 SECURITY_INFORMATION SecurityInfo,
136 PSID pOwner,
137 PSID pGroup,
138 PACL pDacl,
139 PACL pSacl,
140 BOOL KeepExplicit,
141 FN_PROGRESSW fnProgress,
142 PROG_INVOKE_SETTING ProgressInvokeSetting,
143 PVOID Args);
144 /* 30C */
145 DWORD (WINAPI *GetInheritanceSource)(LPWSTR pObjectName,
146 SE_OBJECT_TYPE ObjectType,
147 SECURITY_INFORMATION SecurityInfo,
148 BOOL Container,
149 GUID** pObjectClassGuids,
150 DWORD GuidCount,
151 PACL pAcl,
152 PFN_OBJECT_MGR_FUNCTS pfnArray,
153 PGENERIC_MAPPING pGenericMapping,
154 PINHERITED_FROMW pInheritArray);
155
156 /* 310 */
157 DWORD (WINAPI *FreeIndexArray)(PINHERITED_FROMW pInheritArray,
158 USHORT AceCnt,
159 PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL);
160 } NTMARTA, *PNTMARTA;
161
162 #define AccLookupAccountTrustee NtMartaStatic.LookupAccountTrustee
163 #define AccLookupAccountName NtMartaStatic.LookupAccountName
164 #define AccLookupAccountSid NtMartaStatic.LookupAccountSid
165 #define AccSetEntriesInAList NtMartaStatic.SetEntriesInAList
166 #define AccConvertAccessToSecurityDescriptor NtMartaStatic.ConvertAccessToSecurityDescriptor
167 #define AccConvertSDToAccess NtMartaStatic.ConvertSDToAccess
168 #define AccConvertAclToAccess NtMartaStatic.ConvertAclToAccess
169 #define AccGetAccessForTrustee NtMartaStatic.GetAccessForTrustee
170 #define AccGetExplicitEntries NtMartaStatic.GetExplicitEntries
171 #define AccRewriteGetNamedRights NtMartaStatic.RewriteGetNamedRights
172 #define AccRewriteSetNamedRights NtMartaStatic.RewriteSetNamedRights
173 #define AccRewriteGetHandleRights NtMartaStatic.RewriteGetHandleRights
174 #define AccRewriteSetHandleRights NtMartaStatic.RewriteSetHandleRights
175 #define AccRewriteSetEntriesInAcl NtMartaStatic.RewriteSetEntriesInAcl
176 #define AccRewriteGetExplicitEntriesFromAcl NtMartaStatic.RewriteGetExplicitEntriesFromAcl
177 #define AccTreeResetNamedSecurityInfo NtMartaStatic.TreeResetNamedSecurityInfo
178 #define AccGetInheritanceSource NtMartaStatic.GetInheritanceSource
179 #define AccFreeIndexArray NtMartaStatic.FreeIndexArray
180
181 extern NTMARTA NtMartaStatic;
182
183 DWORD CheckNtMartaPresent(VOID);
184
185 #endif /* __ADVAPI32_H */