3c7d2a9375ba3647170b35891ab11ad108a2c12a
[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 /* sid.c */
61
62 BOOL ADVAPI_GetComputerSid(PSID sid);
63
64 /* rpc.c */
65
66 RPC_STATUS EvtBindRpc(LPCWSTR pszMachine,
67 RPC_BINDING_HANDLE* BindingHandle);
68 RPC_STATUS EvtUnbindRpc(RPC_BINDING_HANDLE *BindingHandle);
69
70 BOOL
71 EvtGetLocalHandle(RPC_BINDING_HANDLE *BindingHandle);
72 RPC_STATUS EvtUnbindLocalHandle(void);
73
74 /* scm.c */
75 DWORD
76 ScmRpcStatusToWinError(RPC_STATUS Status);
77
78 /* Interface to ntmarta.dll **************************************************/
79
80 typedef struct _NTMARTA
81 {
82 HINSTANCE hDllInstance;
83
84 /* 2CC */PVOID LookupAccountTrustee;
85 /* 2D0 */PVOID LookupAccountName;
86 /* 2D4 */PVOID LookupAccountSid;
87 /* 2D8 */PVOID SetEntriesInAList;
88 /* 2DC */PVOID ConvertAccessToSecurityDescriptor;
89 /* 2E0 */PVOID ConvertSDToAccess;
90 /* 2E4 */PVOID ConvertAclToAccess;
91 /* 2E8 */PVOID GetAccessForTrustee;
92 /* 2EC */PVOID GetExplicitEntries;
93 /* 2F0 */
94 DWORD (WINAPI *RewriteGetNamedRights)(LPWSTR pObjectName,
95 SE_OBJECT_TYPE ObjectType,
96 SECURITY_INFORMATION SecurityInfo,
97 PSID* ppsidOwner,
98 PSID* ppsidGroup,
99 PACL* ppDacl,
100 PACL* ppSacl,
101 PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
102
103 /* 2F4 */
104 DWORD (WINAPI *RewriteSetNamedRights)(LPWSTR pObjectName,
105 SE_OBJECT_TYPE ObjectType,
106 SECURITY_INFORMATION SecurityInfo,
107 PSECURITY_DESCRIPTOR pSecurityDescriptor);
108
109 /*2F8*/
110 DWORD (WINAPI *RewriteGetHandleRights)(HANDLE handle,
111 SE_OBJECT_TYPE ObjectType,
112 SECURITY_INFORMATION SecurityInfo,
113 PSID* ppsidOwner,
114 PSID* ppsidGroup,
115 PACL* ppDacl,
116 PACL* ppSacl,
117 PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
118
119 /* 2FC */
120 DWORD (WINAPI *RewriteSetHandleRights)(HANDLE handle,
121 SE_OBJECT_TYPE ObjectType,
122 SECURITY_INFORMATION SecurityInfo,
123 PSECURITY_DESCRIPTOR pSecurityDescriptor);
124
125 /* 300 */
126 DWORD (WINAPI *RewriteSetEntriesInAcl)(ULONG cCountOfExplicitEntries,
127 PEXPLICIT_ACCESS_W pListOfExplicitEntries,
128 PACL OldAcl,
129 PACL* NewAcl);
130
131 /* 304 */
132 DWORD (WINAPI *RewriteGetExplicitEntriesFromAcl)(PACL pacl,
133 PULONG pcCountOfExplicitEntries,
134 PEXPLICIT_ACCESS_W* pListOfExplicitEntries);
135
136 /* 308 */
137 DWORD (WINAPI *TreeResetNamedSecurityInfo)(LPWSTR pObjectName,
138 SE_OBJECT_TYPE ObjectType,
139 SECURITY_INFORMATION SecurityInfo,
140 PSID pOwner,
141 PSID pGroup,
142 PACL pDacl,
143 PACL pSacl,
144 BOOL KeepExplicit,
145 FN_PROGRESSW fnProgress,
146 PROG_INVOKE_SETTING ProgressInvokeSetting,
147 PVOID Args);
148 /* 30C */
149 DWORD (WINAPI *GetInheritanceSource)(LPWSTR pObjectName,
150 SE_OBJECT_TYPE ObjectType,
151 SECURITY_INFORMATION SecurityInfo,
152 BOOL Container,
153 GUID** pObjectClassGuids,
154 DWORD GuidCount,
155 PACL pAcl,
156 PFN_OBJECT_MGR_FUNCTS pfnArray,
157 PGENERIC_MAPPING pGenericMapping,
158 PINHERITED_FROMW pInheritArray);
159
160 /* 310 */
161 DWORD (WINAPI *FreeIndexArray)(PINHERITED_FROMW pInheritArray,
162 USHORT AceCnt,
163 PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL);
164 } NTMARTA, *PNTMARTA;
165
166 #define AccLookupAccountTrustee NtMartaStatic.LookupAccountTrustee
167 #define AccLookupAccountName NtMartaStatic.LookupAccountName
168 #define AccLookupAccountSid NtMartaStatic.LookupAccountSid
169 #define AccSetEntriesInAList NtMartaStatic.SetEntriesInAList
170 #define AccConvertAccessToSecurityDescriptor NtMartaStatic.ConvertAccessToSecurityDescriptor
171 #define AccConvertSDToAccess NtMartaStatic.ConvertSDToAccess
172 #define AccConvertAclToAccess NtMartaStatic.ConvertAclToAccess
173 #define AccGetAccessForTrustee NtMartaStatic.GetAccessForTrustee
174 #define AccGetExplicitEntries NtMartaStatic.GetExplicitEntries
175 #define AccRewriteGetNamedRights NtMartaStatic.RewriteGetNamedRights
176 #define AccRewriteSetNamedRights NtMartaStatic.RewriteSetNamedRights
177 #define AccRewriteGetHandleRights NtMartaStatic.RewriteGetHandleRights
178 #define AccRewriteSetHandleRights NtMartaStatic.RewriteSetHandleRights
179 #define AccRewriteSetEntriesInAcl NtMartaStatic.RewriteSetEntriesInAcl
180 #define AccRewriteGetExplicitEntriesFromAcl NtMartaStatic.RewriteGetExplicitEntriesFromAcl
181 #define AccTreeResetNamedSecurityInfo NtMartaStatic.TreeResetNamedSecurityInfo
182 #define AccGetInheritanceSource NtMartaStatic.GetInheritanceSource
183 #define AccFreeIndexArray NtMartaStatic.FreeIndexArray
184
185 extern NTMARTA NtMartaStatic;
186
187 DWORD CheckNtMartaPresent(VOID);
188
189 #endif /* __ADVAPI32_H */