ReactOS  0.4.13-dev-39-g8b6696f
advapi32.h
Go to the documentation of this file.
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 Library 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 WINE_STRICT_PROTOTYPES
19 #define WIN32_NO_STATUS
20 #define WIN32_LEAN_AND_MEAN
21 #define _INC_WINDOWS
22 #define COM_NO_WINDOWS_H
23 #define _WMI_SOURCE_
24 #include <aclapi.h>
25 #include <winsafer.h>
26 
27 #define NTOS_MODE_USER
28 #include <ndk/iofuncs.h>
29 #include <ndk/obfuncs.h>
30 #include <ndk/psfuncs.h>
31 #include <ndk/rtlfuncs.h>
32 #include <ndk/sefuncs.h>
33 #include <ndk/setypes.h>
34 
35 /* this has to go after the NDK when being used with the NDK */
36 #include <ntsecapi.h>
37 
38 #include <services/services.h>
39 #include <svcctl_c.h>
40 #include <winreg_c.h>
41 
42 #include <wine/debug.h>
43 #include <wine/unicode.h>
44 
45 #include "wine/crypt.h"
46 
47 #ifndef HAS_FN_PROGRESSW
48 #define FN_PROGRESSW FN_PROGRESS
49 #endif
50 #ifndef HAS_FN_PROGRESSA
51 #define FN_PROGRESSA FN_PROGRESS
52 #endif
53 
54 /* logon.c */
55 
58 
59 /* rpc.c */
60 
61 RPC_STATUS EvtBindRpc(LPCWSTR pszMachine,
64 
65 BOOL
68 
69 /* scm.c */
70 DWORD
72 
73 /* Interface to ntmarta.dll **************************************************/
74 
75 typedef struct _NTMARTA
76 {
78 
88  /* 2F0 */
89  DWORD (WINAPI *RewriteGetNamedRights)(LPWSTR pObjectName,
94  PACL* ppDacl,
95  PACL* ppSacl,
97 
98  /* 2F4 */
99  DWORD (WINAPI *RewriteSetNamedRights)(LPWSTR pObjectName,
103 
104  /*2F8*/
105  DWORD (WINAPI *RewriteGetHandleRights)(HANDLE handle,
108  PSID* ppsidOwner,
109  PSID* ppsidGroup,
110  PACL* ppDacl,
111  PACL* ppSacl,
113 
114  /* 2FC */
115  DWORD (WINAPI *RewriteSetHandleRights)(HANDLE handle,
119 
120  /* 300 */
121  DWORD (WINAPI *RewriteSetEntriesInAcl)(ULONG cCountOfExplicitEntries,
123  PACL OldAcl,
124  PACL* NewAcl);
125 
126  /* 304 */
127  DWORD (WINAPI *RewriteGetExplicitEntriesFromAcl)(PACL pacl,
130 
131  /* 308 */
132  DWORD (WINAPI *TreeResetNamedSecurityInfo)(LPWSTR pObjectName,
135  PSID pOwner,
136  PSID pGroup,
137  PACL pDacl,
138  PACL pSacl,
142  PVOID Args);
143  /* 30C */
144  DWORD (WINAPI *GetInheritanceSource)(LPWSTR pObjectName,
147  BOOL Container,
150  PACL pAcl,
153  PINHERITED_FROMW pInheritArray);
154 
155  /* 310 */
156  DWORD (WINAPI *FreeIndexArray)(PINHERITED_FROMW pInheritArray,
159 } NTMARTA, *PNTMARTA;
160 
161 #define AccLookupAccountTrustee NtMartaStatic.LookupAccountTrustee
162 #define AccLookupAccountName NtMartaStatic.LookupAccountName
163 #define AccLookupAccountSid NtMartaStatic.LookupAccountSid
164 #define AccSetEntriesInAList NtMartaStatic.SetEntriesInAList
165 #define AccConvertAccessToSecurityDescriptor NtMartaStatic.ConvertAccessToSecurityDescriptor
166 #define AccConvertSDToAccess NtMartaStatic.ConvertSDToAccess
167 #define AccConvertAclToAccess NtMartaStatic.ConvertAclToAccess
168 #define AccGetAccessForTrustee NtMartaStatic.GetAccessForTrustee
169 #define AccGetExplicitEntries NtMartaStatic.GetExplicitEntries
170 #define AccRewriteGetNamedRights NtMartaStatic.RewriteGetNamedRights
171 #define AccRewriteSetNamedRights NtMartaStatic.RewriteSetNamedRights
172 #define AccRewriteGetHandleRights NtMartaStatic.RewriteGetHandleRights
173 #define AccRewriteSetHandleRights NtMartaStatic.RewriteSetHandleRights
174 #define AccRewriteSetEntriesInAcl NtMartaStatic.RewriteSetEntriesInAcl
175 #define AccRewriteGetExplicitEntriesFromAcl NtMartaStatic.RewriteGetExplicitEntriesFromAcl
176 #define AccTreeResetNamedSecurityInfo NtMartaStatic.TreeResetNamedSecurityInfo
177 #define AccGetInheritanceSource NtMartaStatic.GetInheritanceSource
178 #define AccFreeIndexArray NtMartaStatic.FreeIndexArray
179 
180 extern NTMARTA NtMartaStatic;
181 
183 
184 /* heap allocation helpers */
185 static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
186 static inline void *heap_alloc( size_t len )
187 {
188  return HeapAlloc( GetProcessHeap(), 0, len );
189 }
190 
191 static inline BOOL heap_free( void *mem )
192 {
193  return HeapFree( GetProcessHeap(), 0, mem );
194 }
195 
196 #endif /* __ADVAPI32_H */
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL FN_PROGRESSW PROG_INVOKE_SETTING ProgressInvokeSetting
Definition: advapi32.h:133
struct _NTMARTA * PNTMARTA
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID pGroup
Definition: advapi32.h:133
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL Container
Definition: advapi32.h:145
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL FN_PROGRESSW fnProgress
Definition: advapi32.h:133
SE_OBJECT_TYPE SECURITY_INFORMATION PSECURITY_DESCRIPTOR pSecurityDescriptor
Definition: advapi32.h:100
PVOID ConvertSDToAccess
Definition: advapi32.h:84
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL * ppDacl
Definition: advapi32.h:90
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
PEXPLICIT_ACCESS_W PACL OldAcl
Definition: advapi32.h:122
#define __WINE_ALLOC_SIZE(x)
Definition: winnt_old.h:84
PVOID SetEntriesInAList
Definition: advapi32.h:82
PULONG PEXPLICIT_ACCESS_W * pListOfExplicitEntries
Definition: advapi32.h:128
LONG NTSTATUS
Definition: precomp.h:26
RPC_STATUS EvtBindRpc(LPCWSTR pszMachine, RPC_BINDING_HANDLE *BindingHandle)
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD GuidCount
Definition: advapi32.h:145
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL PFN_OBJECT_MGR_FUNCTS PGENERIC_MAPPING PINHERITED_FROMW pInheritArray
Definition: advapi32.h:145
DWORD(WINAPI *RewriteGetNamedRights)(LPWSTR pObjectName
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL pDacl
Definition: advapi32.h:133
SE_OBJECT_TYPE SECURITY_INFORMATION SecurityInfo
Definition: advapi32.h:90
PVOID ConvertAccessToSecurityDescriptor
Definition: advapi32.h:83
PVOID LookupAccountName
Definition: advapi32.h:80
SE_OBJECT_TYPE SECURITY_INFORMATION PSID * ppsidOwner
Definition: advapi32.h:90
PEXPLICIT_ACCESS_W pListOfExplicitEntries
Definition: advapi32.h:122
PEXPLICIT_ACCESS_W PACL PACL * NewAcl
Definition: advapi32.h:122
struct _NTMARTA NTMARTA
static void * heap_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: advapi32.h:186
long RPC_STATUS
Definition: rpc.h:52
PVOID ConvertAclToAccess
Definition: advapi32.h:85
RPC_STATUS EvtUnbindRpc(RPC_BINDING_HANDLE *BindingHandle)
PVOID LookupAccountSid
Definition: advapi32.h:81
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
#define FN_PROGRESSW
Definition: advapi32.h:48
RPC_STATUS EvtUnbindLocalHandle(void)
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL pSacl
Definition: advapi32.h:133
enum _PROG_INVOKE_SETTING PROG_INVOKE_SETTING
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL FN_PROGRESSW PROG_INVOKE_SETTING PVOID Args
Definition: advapi32.h:133
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
NTMARTA NtMartaStatic
Definition: misc.c:19
PVOID GetAccessForTrustee
Definition: advapi32.h:86
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL PFN_OBJECT_MGR_FUNCTS PGENERIC_MAPPING pGenericMapping
Definition: advapi32.h:145
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL pAcl
Definition: advapi32.h:145
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
SE_OBJECT_TYPE ObjectType
Definition: advapi32.h:90
#define GetInheritanceSource
Definition: aclapi.h:234
DWORD CheckNtMartaPresent(VOID)
Definition: misc.c:74
GLenum GLsizei len
Definition: glext.h:6722
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID * ppsidGroup
Definition: advapi32.h:90
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL KeepExplicit
Definition: advapi32.h:133
NTSTATUS CloseLogonLsaHandle(VOID)
Definition: logon.c:72
Status
Definition: gdiplustypes.h:24
static BOOL heap_free(void *mem)
Definition: advapi32.h:191
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID ** pObjectClassGuids
Definition: advapi32.h:145
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL * ppSacl
Definition: advapi32.h:90
HINSTANCE hDllInstance
Definition: advapi32.h:77
unsigned short USHORT
Definition: pedump.c:61
BOOL EvtGetLocalHandle(RPC_BINDING_HANDLE *BindingHandle)
PVOID GetExplicitEntries
Definition: advapi32.h:87
DWORD ScmRpcStatusToWinError(RPC_STATUS Status)
Definition: scm.c:146
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL PSECURITY_DESCRIPTOR * ppSecurityDescriptor
Definition: advapi32.h:90
unsigned int * PULONG
Definition: retypes.h:1
USHORT PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL
Definition: advapi32.h:157
Definition: mem.c:156
unsigned int ULONG
Definition: retypes.h:1
PVOID LookupAccountTrustee
Definition: advapi32.h:79
WCHAR * LPWSTR
Definition: xmlstorage.h:184
SE_OBJECT_TYPE SECURITY_INFORMATION PSID pOwner
Definition: advapi32.h:133
USHORT AceCnt
Definition: advapi32.h:157
#define HeapFree(x, y, z)
Definition: compat.h:394
enum _SE_OBJECT_TYPE SE_OBJECT_TYPE
Definition: security.c:104
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL PFN_OBJECT_MGR_FUNCTS pfnArray
Definition: advapi32.h:145
PULONG pcCountOfExplicitEntries
Definition: advapi32.h:128