ReactOS  0.4.13-dev-482-ge57f103
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 <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 165 of file advapi32.h.

◆ AccConvertAclToAccess

#define AccConvertAclToAccess   NtMartaStatic.ConvertAclToAccess

Definition at line 167 of file advapi32.h.

◆ AccConvertSDToAccess

#define AccConvertSDToAccess   NtMartaStatic.ConvertSDToAccess

Definition at line 166 of file advapi32.h.

◆ AccFreeIndexArray

#define AccFreeIndexArray   NtMartaStatic.FreeIndexArray

Definition at line 178 of file advapi32.h.

◆ AccGetAccessForTrustee

#define AccGetAccessForTrustee   NtMartaStatic.GetAccessForTrustee

Definition at line 168 of file advapi32.h.

◆ AccGetExplicitEntries

#define AccGetExplicitEntries   NtMartaStatic.GetExplicitEntries

Definition at line 169 of file advapi32.h.

◆ AccGetInheritanceSource

#define AccGetInheritanceSource   NtMartaStatic.GetInheritanceSource

Definition at line 177 of file advapi32.h.

◆ AccLookupAccountName

#define AccLookupAccountName   NtMartaStatic.LookupAccountName

Definition at line 162 of file advapi32.h.

◆ AccLookupAccountSid

#define AccLookupAccountSid   NtMartaStatic.LookupAccountSid

Definition at line 163 of file advapi32.h.

◆ AccLookupAccountTrustee

#define AccLookupAccountTrustee   NtMartaStatic.LookupAccountTrustee

Definition at line 161 of file advapi32.h.

◆ AccRewriteGetExplicitEntriesFromAcl

#define AccRewriteGetExplicitEntriesFromAcl   NtMartaStatic.RewriteGetExplicitEntriesFromAcl

Definition at line 175 of file advapi32.h.

◆ AccRewriteGetHandleRights

#define AccRewriteGetHandleRights   NtMartaStatic.RewriteGetHandleRights

Definition at line 172 of file advapi32.h.

◆ AccRewriteGetNamedRights

#define AccRewriteGetNamedRights   NtMartaStatic.RewriteGetNamedRights

Definition at line 170 of file advapi32.h.

◆ AccRewriteSetEntriesInAcl

#define AccRewriteSetEntriesInAcl   NtMartaStatic.RewriteSetEntriesInAcl

Definition at line 174 of file advapi32.h.

◆ AccRewriteSetHandleRights

#define AccRewriteSetHandleRights   NtMartaStatic.RewriteSetHandleRights

Definition at line 173 of file advapi32.h.

◆ AccRewriteSetNamedRights

#define AccRewriteSetNamedRights   NtMartaStatic.RewriteSetNamedRights

Definition at line 171 of file advapi32.h.

◆ AccSetEntriesInAList

#define AccSetEntriesInAList   NtMartaStatic.SetEntriesInAList

Definition at line 164 of file advapi32.h.

◆ AccTreeResetNamedSecurityInfo

#define AccTreeResetNamedSecurityInfo   NtMartaStatic.TreeResetNamedSecurityInfo

Definition at line 176 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 51 of file advapi32.h.

◆ FN_PROGRESSW

#define FN_PROGRESSW   FN_PROGRESS

Definition at line 48 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 
86  if (ErrorCode == ERROR_SUCCESS)
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", ErrorCode);
102  }
103 #endif
104  }
105  else
106  {
107  /* ntmarta was already initialized */
109  }
110 
111  return ErrorCode;
112 }
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
static PNTMARTA NtMarta
Definition: misc.c:20
#define ERROR_SUCCESS
Definition: deptool.c:10
static DWORD LoadAndInitializeNtMarta(VOID)
Definition: misc.c:32
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
#define FreeLibrary(x)
Definition: compat.h:405
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:109
HINSTANCE hDllInstance
Definition: advapi32.h:77
NTMARTA NtMartaStatic
Definition: misc.c:19

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

◆ CloseLogonLsaHandle()

NTSTATUS CloseLogonLsaHandle ( VOID  )

Definition at line 72 of file logon.c.

73 {
75 
76  if (LsaHandle != NULL)
77  {
79  if (!NT_SUCCESS(Status))
80  {
81  TRACE("LsaDeregisterLogonProcess failed (Status 0x%08lx)\n", Status);
82  }
83  }
84 
85  return Status;
86 }
LONG NTSTATUS
Definition: precomp.h:26
HANDLE LsaHandle
Definition: logon.c:14
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE)
Status
Definition: gdiplustypes.h:24
return STATUS_SUCCESS
Definition: btrfs.c:2777

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 186 of file advapi32.h.

187 {
188  return HeapAlloc( GetProcessHeap(), 0, len );
189 }
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLenum GLsizei len
Definition: glext.h:6722

◆ heap_free()

static BOOL heap_free ( void mem)
inlinestatic

Definition at line 191 of file advapi32.h.

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

◆ 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  {
156  return ERROR_INVALID_HANDLE;
157 
161 
163  return ERROR_INVALID_ADDRESS;
164 
165  default:
166  return (DWORD)Status;
167  }
168 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define RPC_X_SS_IN_NULL_CONTEXT
Definition: winerror.h:1083
#define RPC_X_NULL_REF_POINTER
Definition: winerror.h:1087
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
#define RPC_X_BYTE_COUNT_TOO_SMALL
Definition: winerror.h:1089
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERROR_INVALID_ADDRESS
Definition: compat.h:96
#define RPC_X_ENUM_VALUE_OUT_OF_RANGE
Definition: winerror.h:1088
Status
Definition: gdiplustypes.h:24
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228

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(), 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

Definition at line 19 of file misc.c.

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