ReactOS  0.4.15-dev-4603-gb922b6d
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 <seclogon_c.h>
40 #include <svcctl_c.h>
41 #include <winreg_c.h>
42 
43 #include <wine/debug.h>
44 #include <wine/unicode.h>
45 
46 #include "wine/crypt.h"
47 
48 #ifndef HAS_FN_PROGRESSW
49 #define FN_PROGRESSW FN_PROGRESS
50 #endif
51 #ifndef HAS_FN_PROGRESSA
52 #define FN_PROGRESSA FN_PROGRESS
53 #endif
54 
55 /* logon.c */
56 
59 
60 /* rpc.c */
61 
62 RPC_STATUS EvtBindRpc(LPCWSTR pszMachine,
65 
66 BOOL
69 
70 /* scm.c */
71 DWORD
73 
74 /* Interface to ntmarta.dll **************************************************/
75 
76 typedef struct _NTMARTA
77 {
79 
89  /* 2F0 */
90  DWORD (WINAPI *RewriteGetNamedRights)(LPWSTR pObjectName,
95  PACL* ppDacl,
96  PACL* ppSacl,
98 
99  /* 2F4 */
100  DWORD (WINAPI *RewriteSetNamedRights)(LPWSTR pObjectName,
104 
105  /*2F8*/
106  DWORD (WINAPI *RewriteGetHandleRights)(HANDLE handle,
109  PSID* ppsidOwner,
110  PSID* ppsidGroup,
111  PACL* ppDacl,
112  PACL* ppSacl,
114 
115  /* 2FC */
116  DWORD (WINAPI *RewriteSetHandleRights)(HANDLE handle,
120 
121  /* 300 */
122  DWORD (WINAPI *RewriteSetEntriesInAcl)(ULONG cCountOfExplicitEntries,
124  PACL OldAcl,
125  PACL* NewAcl);
126 
127  /* 304 */
128  DWORD (WINAPI *RewriteGetExplicitEntriesFromAcl)(PACL pacl,
131 
132  /* 308 */
133  DWORD (WINAPI *TreeResetNamedSecurityInfo)(LPWSTR pObjectName,
136  PSID pOwner,
137  PSID pGroup,
138  PACL pDacl,
139  PACL pSacl,
143  PVOID Args);
144  /* 30C */
145  DWORD (WINAPI *GetInheritanceSource)(LPWSTR pObjectName,
148  BOOL Container,
151  PACL pAcl,
154  PINHERITED_FROMW pInheritArray);
155 
156  /* 310 */
157  DWORD (WINAPI *FreeIndexArray)(PINHERITED_FROMW pInheritArray,
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 
184 
185 /* heap allocation helpers */
186 static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
187 static inline void *heap_alloc( size_t len )
188 {
189  return HeapAlloc( GetProcessHeap(), 0, len );
190 }
191 
192 static inline BOOL heap_free( void *mem )
193 {
194  return HeapFree( GetProcessHeap(), 0, mem );
195 }
196 
197 #endif /* __ADVAPI32_H */
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL FN_PROGRESSW PROG_INVOKE_SETTING ProgressInvokeSetting
Definition: advapi32.h:134
struct _NTMARTA * PNTMARTA
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID pGroup
Definition: advapi32.h:134
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL Container
Definition: advapi32.h:146
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL FN_PROGRESSW fnProgress
Definition: advapi32.h:134
SE_OBJECT_TYPE SECURITY_INFORMATION PSECURITY_DESCRIPTOR pSecurityDescriptor
Definition: advapi32.h:101
PVOID ConvertSDToAccess
Definition: advapi32.h:85
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL * ppDacl
Definition: advapi32.h:91
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
PEXPLICIT_ACCESS_W PACL OldAcl
Definition: advapi32.h:123
#define __WINE_ALLOC_SIZE(x)
Definition: winnt_old.h:84
PVOID SetEntriesInAList
Definition: advapi32.h:83
PULONG PEXPLICIT_ACCESS_W * pListOfExplicitEntries
Definition: advapi32.h:129
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:146
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL PFN_OBJECT_MGR_FUNCTS PGENERIC_MAPPING PINHERITED_FROMW pInheritArray
Definition: advapi32.h:146
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:134
SE_OBJECT_TYPE SECURITY_INFORMATION SecurityInfo
Definition: advapi32.h:91
PVOID ConvertAccessToSecurityDescriptor
Definition: advapi32.h:84
PVOID LookupAccountName
Definition: advapi32.h:81
SE_OBJECT_TYPE SECURITY_INFORMATION PSID * ppsidOwner
Definition: advapi32.h:91
PEXPLICIT_ACCESS_W pListOfExplicitEntries
Definition: advapi32.h:123
PEXPLICIT_ACCESS_W PACL PACL * NewAcl
Definition: advapi32.h:123
struct _NTMARTA NTMARTA
static void * heap_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: advapi32.h:187
long RPC_STATUS
Definition: rpc.h:52
PVOID ConvertAclToAccess
Definition: advapi32.h:86
RPC_STATUS EvtUnbindRpc(RPC_BINDING_HANDLE *BindingHandle)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
PVOID LookupAccountSid
Definition: advapi32.h:82
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
#define FN_PROGRESSW
Definition: advapi32.h:49
RPC_STATUS EvtUnbindLocalHandle(void)
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL pSacl
Definition: advapi32.h:134
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:134
Status
Definition: gdiplustypes.h:24
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
NTMARTA NtMartaStatic
Definition: misc.c:19
PVOID GetAccessForTrustee
Definition: advapi32.h:87
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL PFN_OBJECT_MGR_FUNCTS PGENERIC_MAPPING pGenericMapping
Definition: advapi32.h:146
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID DWORD PACL pAcl
Definition: advapi32.h:146
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
SE_OBJECT_TYPE ObjectType
Definition: advapi32.h:91
#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:91
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL BOOL KeepExplicit
Definition: advapi32.h:134
NTSTATUS CloseLogonLsaHandle(VOID)
Definition: logon.c:75
static BOOL heap_free(void *mem)
Definition: advapi32.h:192
SE_OBJECT_TYPE SECURITY_INFORMATION BOOL GUID ** pObjectClassGuids
Definition: advapi32.h:146
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL * ppSacl
Definition: advapi32.h:91
HINSTANCE hDllInstance
Definition: advapi32.h:78
unsigned short USHORT
Definition: pedump.c:61
BOOL EvtGetLocalHandle(RPC_BINDING_HANDLE *BindingHandle)
PVOID GetExplicitEntries
Definition: advapi32.h:88
DWORD ScmRpcStatusToWinError(RPC_STATUS Status)
Definition: scm.c:146
SE_OBJECT_TYPE SECURITY_INFORMATION PSID PSID PACL PACL PSECURITY_DESCRIPTOR * ppSecurityDescriptor
Definition: advapi32.h:91
unsigned int * PULONG
Definition: retypes.h:1
USHORT PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL
Definition: advapi32.h:158
Definition: mem.c:156
unsigned int ULONG
Definition: retypes.h:1
PVOID LookupAccountTrustee
Definition: advapi32.h:80
WCHAR * LPWSTR
Definition: xmlstorage.h:184
SE_OBJECT_TYPE SECURITY_INFORMATION PSID pOwner
Definition: advapi32.h:134
USHORT AceCnt
Definition: advapi32.h:158
#define HeapFree(x, y, z)
Definition: compat.h:594
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:146
PULONG pcCountOfExplicitEntries
Definition: advapi32.h:129