ReactOS 0.4.15-dev-7907-g95bf896
advapi32.h File Reference
#include <limits.h>
#include <stdio.h>
#include <aclapi.h>
#include <winsafer.h>
#include <ndk/iofuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/psfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/sefuncs.h>
#include <ndk/setypes.h>
#include <ntsecapi.h>
#include <services/services.h>
#include <seclogon_c.h>
#include <svcctl_c.h>
#include <winreg_c.h>
#include <wine/debug.h>
#include <wine/unicode.h>
#include "wine/crypt.h"
Include dependency graph for advapi32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _NTMARTA
 

Macros

#define WINE_STRICT_PROTOTYPES
 
#define WIN32_NO_STATUS
 
#define WIN32_LEAN_AND_MEAN
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define _WMI_SOURCE_
 
#define NTOS_MODE_USER
 
#define FN_PROGRESSW   FN_PROGRESS
 
#define FN_PROGRESSA   FN_PROGRESS
 
#define AccLookupAccountTrustee   NtMartaStatic.LookupAccountTrustee
 
#define AccLookupAccountName   NtMartaStatic.LookupAccountName
 
#define AccLookupAccountSid   NtMartaStatic.LookupAccountSid
 
#define AccSetEntriesInAList   NtMartaStatic.SetEntriesInAList
 
#define AccConvertAccessToSecurityDescriptor   NtMartaStatic.ConvertAccessToSecurityDescriptor
 
#define AccConvertSDToAccess   NtMartaStatic.ConvertSDToAccess
 
#define AccConvertAclToAccess   NtMartaStatic.ConvertAclToAccess
 
#define AccGetAccessForTrustee   NtMartaStatic.GetAccessForTrustee
 
#define AccGetExplicitEntries   NtMartaStatic.GetExplicitEntries
 
#define AccRewriteGetNamedRights   NtMartaStatic.RewriteGetNamedRights
 
#define AccRewriteSetNamedRights   NtMartaStatic.RewriteSetNamedRights
 
#define AccRewriteGetHandleRights   NtMartaStatic.RewriteGetHandleRights
 
#define AccRewriteSetHandleRights   NtMartaStatic.RewriteSetHandleRights
 
#define AccRewriteSetEntriesInAcl   NtMartaStatic.RewriteSetEntriesInAcl
 
#define AccRewriteGetExplicitEntriesFromAcl   NtMartaStatic.RewriteGetExplicitEntriesFromAcl
 
#define AccTreeResetNamedSecurityInfo   NtMartaStatic.TreeResetNamedSecurityInfo
 
#define AccGetInheritanceSource   NtMartaStatic.GetInheritanceSource
 
#define AccFreeIndexArray   NtMartaStatic.FreeIndexArray
 

Typedefs

typedef struct _NTMARTA NTMARTA
 
typedef struct _NTMARTAPNTMARTA
 

Functions

NTSTATUS CloseLogonLsaHandle (VOID)
 
RPC_STATUS EvtBindRpc (LPCWSTR pszMachine, RPC_BINDING_HANDLE *BindingHandle)
 
RPC_STATUS EvtUnbindRpc (RPC_BINDING_HANDLE *BindingHandle)
 
BOOL EvtGetLocalHandle (RPC_BINDING_HANDLE *BindingHandle)
 
RPC_STATUS EvtUnbindLocalHandle (void)
 
DWORD ScmRpcStatusToWinError (RPC_STATUS Status)
 
DWORD CheckNtMartaPresent (VOID)
 
static voidheap_alloc (size_t len) __WINE_ALLOC_SIZE(1)
 
static BOOL heap_free (void *mem)
 

Variables

NTMARTA NtMartaStatic
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 21 of file advapi32.h.

◆ _WMI_SOURCE_

#define _WMI_SOURCE_

Definition at line 23 of file advapi32.h.

◆ AccConvertAccessToSecurityDescriptor

#define AccConvertAccessToSecurityDescriptor   NtMartaStatic.ConvertAccessToSecurityDescriptor

Definition at line 166 of file advapi32.h.

◆ AccConvertAclToAccess

#define AccConvertAclToAccess   NtMartaStatic.ConvertAclToAccess

Definition at line 168 of file advapi32.h.

◆ AccConvertSDToAccess

#define AccConvertSDToAccess   NtMartaStatic.ConvertSDToAccess

Definition at line 167 of file advapi32.h.

◆ AccFreeIndexArray

#define AccFreeIndexArray   NtMartaStatic.FreeIndexArray

Definition at line 179 of file advapi32.h.

◆ AccGetAccessForTrustee

#define AccGetAccessForTrustee   NtMartaStatic.GetAccessForTrustee

Definition at line 169 of file advapi32.h.

◆ AccGetExplicitEntries

#define AccGetExplicitEntries   NtMartaStatic.GetExplicitEntries

Definition at line 170 of file advapi32.h.

◆ AccGetInheritanceSource

#define AccGetInheritanceSource   NtMartaStatic.GetInheritanceSource

Definition at line 178 of file advapi32.h.

◆ AccLookupAccountName

#define AccLookupAccountName   NtMartaStatic.LookupAccountName

Definition at line 163 of file advapi32.h.

◆ AccLookupAccountSid

#define AccLookupAccountSid   NtMartaStatic.LookupAccountSid

Definition at line 164 of file advapi32.h.

◆ AccLookupAccountTrustee

#define AccLookupAccountTrustee   NtMartaStatic.LookupAccountTrustee

Definition at line 162 of file advapi32.h.

◆ AccRewriteGetExplicitEntriesFromAcl

#define AccRewriteGetExplicitEntriesFromAcl   NtMartaStatic.RewriteGetExplicitEntriesFromAcl

Definition at line 176 of file advapi32.h.

◆ AccRewriteGetHandleRights

#define AccRewriteGetHandleRights   NtMartaStatic.RewriteGetHandleRights

Definition at line 173 of file advapi32.h.

◆ AccRewriteGetNamedRights

#define AccRewriteGetNamedRights   NtMartaStatic.RewriteGetNamedRights

Definition at line 171 of file advapi32.h.

◆ AccRewriteSetEntriesInAcl

#define AccRewriteSetEntriesInAcl   NtMartaStatic.RewriteSetEntriesInAcl

Definition at line 175 of file advapi32.h.

◆ AccRewriteSetHandleRights

#define AccRewriteSetHandleRights   NtMartaStatic.RewriteSetHandleRights

Definition at line 174 of file advapi32.h.

◆ AccRewriteSetNamedRights

#define AccRewriteSetNamedRights   NtMartaStatic.RewriteSetNamedRights

Definition at line 172 of file advapi32.h.

◆ AccSetEntriesInAList

#define AccSetEntriesInAList   NtMartaStatic.SetEntriesInAList

Definition at line 165 of file advapi32.h.

◆ AccTreeResetNamedSecurityInfo

#define AccTreeResetNamedSecurityInfo   NtMartaStatic.TreeResetNamedSecurityInfo

Definition at line 177 of file advapi32.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 22 of file advapi32.h.

◆ FN_PROGRESSA

#define FN_PROGRESSA   FN_PROGRESS

Definition at line 52 of file advapi32.h.

◆ FN_PROGRESSW

#define FN_PROGRESSW   FN_PROGRESS

Definition at line 49 of file advapi32.h.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 27 of file advapi32.h.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 20 of file advapi32.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 19 of file advapi32.h.

◆ WINE_STRICT_PROTOTYPES

#define WINE_STRICT_PROTOTYPES

Definition at line 18 of file advapi32.h.

Typedef Documentation

◆ NTMARTA

◆ PNTMARTA

Function Documentation

◆ CheckNtMartaPresent()

DWORD CheckNtMartaPresent ( VOID  )

Definition at line 74 of file misc.c.

75{
77
79 NULL,
80 NULL) == NULL)
81 {
82 /* we're the first one trying to use ntmarta, initialize it and change
83 the pointer after initialization */
85
87 {
88 /* try change the NtMarta pointer */
91 NULL) != NULL)
92 {
93 /* another thread initialized ntmarta in the meanwhile, release
94 the reference of the dll loaded. */
96 }
97 }
98#if DBG
99 else
100 {
101 ERR("Failed to initialize ntmarta.dll! Error: 0x%x\n", ErrorCode);
102 }
103#endif
104 }
105 else
106 {
107 /* ntmarta was already initialized */
109 }
110
111 return ErrorCode;
112}
#define ERR(fmt,...)
Definition: debug.h:110
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
NTMARTA NtMartaStatic
Definition: misc.c:19
static DWORD LoadAndInitializeNtMarta(VOID)
Definition: misc.c:32
static PNTMARTA NtMarta
Definition: misc.c:20
#define FreeLibrary(x)
Definition: compat.h:748
unsigned long DWORD
Definition: ntddk_ex.h:95
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
HINSTANCE hDllInstance
Definition: advapi32.h:78

Referenced by FreeInheritedFromArray(), GetExplicitEntriesFromAclW(), GetInheritanceSourceW(), GetNamedSecurityInfoW(), GetSecurityInfo(), SetEntriesInAclW(), SetNamedSecurityInfoW(), SetSecurityInfo(), and TreeResetNamedSecurityInfoW().

◆ CloseLogonLsaHandle()

NTSTATUS CloseLogonLsaHandle ( VOID  )

Definition at line 75 of file logon.c.

76{
78
79 if (LsaHandle != NULL)
80 {
82 if (!NT_SUCCESS(Status))
83 {
84 TRACE("LsaDeregisterLogonProcess failed (Status 0x%08lx)\n", Status);
85 }
86 }
87
88 return Status;
89}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
HANDLE LsaHandle
Definition: logon.c:17
Status
Definition: gdiplustypes.h:25
NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE)
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by DllMain().

◆ EvtBindRpc()

RPC_STATUS EvtBindRpc ( LPCWSTR  pszMachine,
RPC_BINDING_HANDLE BindingHandle 
)

◆ EvtGetLocalHandle()

BOOL EvtGetLocalHandle ( RPC_BINDING_HANDLE BindingHandle)

◆ EvtUnbindLocalHandle()

RPC_STATUS EvtUnbindLocalHandle ( void  )

◆ EvtUnbindRpc()

RPC_STATUS EvtUnbindRpc ( RPC_BINDING_HANDLE BindingHandle)

◆ heap_alloc()

static void * heap_alloc ( size_t  len)
inlinestatic

Definition at line 187 of file advapi32.h.

188{
189 return HeapAlloc( GetProcessHeap(), 0, len );
190}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
GLenum GLsizei len
Definition: glext.h:6722

◆ heap_free()

static BOOL heap_free ( void mem)
inlinestatic

Definition at line 192 of file advapi32.h.

193{
194 return HeapFree( GetProcessHeap(), 0, mem );
195}
#define HeapFree(x, y, z)
Definition: compat.h:735
Definition: mem.c:156

◆ ScmRpcStatusToWinError()

DWORD ScmRpcStatusToWinError ( RPC_STATUS  Status)

Definition at line 146 of file scm.c.

147{
148 TRACE("ScmRpcStatusToWinError(%lx)\n",
149 Status);
150
151 switch (Status)
152 {
157
161
164
165 default:
166 return (DWORD)Status;
167 }
168}
#define ERROR_INVALID_ADDRESS
Definition: compat.h:106
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define RPC_X_ENUM_VALUE_OUT_OF_RANGE
Definition: winerror.h:1088
#define RPC_X_SS_IN_NULL_CONTEXT
Definition: winerror.h:1083
#define RPC_X_NULL_REF_POINTER
Definition: winerror.h:1087
#define RPC_X_BYTE_COUNT_TOO_SMALL
Definition: winerror.h:1089
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013

Referenced by ChangeServiceConfig2A(), ChangeServiceConfig2W(), ChangeServiceConfigA(), ChangeServiceConfigW(), CloseServiceHandle(), ControlService(), CreateServiceA(), CreateServiceW(), DeleteService(), EnumDependentServicesA(), EnumDependentServicesW(), EnumServiceGroupW(), EnumServicesStatusA(), EnumServicesStatusExA(), EnumServicesStatusExW(), EnumServicesStatusW(), GetServiceDisplayNameA(), GetServiceDisplayNameW(), GetServiceKeyNameA(), GetServiceKeyNameW(), I_ScGetCurrentGroupStateW(), I_ScQueryServiceTagInfo(), I_ScSetServiceBitsA(), I_ScSetServiceBitsW(), I_ScValidatePnpService(), LockServiceDatabase(), NotifyBootConfigStatus(), OpenSCManagerA(), OpenSCManagerW(), OpenServiceA(), OpenServiceW(), QueryServiceConfig2A(), QueryServiceConfig2W(), QueryServiceConfigA(), QueryServiceConfigW(), QueryServiceLockStatusA(), QueryServiceLockStatusW(), QueryServiceObjectSecurity(), QueryServiceStatus(), QueryServiceStatusEx(), SetServiceObjectSecurity(), SetServiceStatus(), StartServiceA(), StartServiceW(), and UnlockServiceDatabase().

Variable Documentation

◆ NtMartaStatic

NTMARTA NtMartaStatic
extern

Definition at line 19 of file misc.c.

Referenced by CheckNtMartaPresent(), LoadAndInitializeNtMarta(), and UnloadNtMarta().