ReactOS  0.4.14-dev-77-gd9e7c48
dllmain.c File Reference
#include <advapi32.h>
Include dependency graph for dllmain.c:

Go to the source code of this file.

Functions

BOOL RegInitialize (VOID)
 
BOOL RegCleanup (VOID)
 
VOID UnloadNtMarta (VOID)
 
VOID CloseKsecDdHandle (VOID)
 
BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD dwReason, LPVOID reserved)
 

Function Documentation

◆ CloseKsecDdHandle()

VOID CloseKsecDdHandle ( VOID  )

Definition at line 682 of file sysfunc.c.

683 {
684  /* Check if we already opened a handle to ksecdd */
685  if (KsecDeviceHandle != NULL)
686  {
687  /* Close it */
690  }
691 }
#define CloseHandle
Definition: compat.h:398
HANDLE KsecDeviceHandle
Definition: sysfunc.c:645
smooth NULL
Definition: ftsmooth.c:416

Referenced by DllMain().

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDll,
DWORD  dwReason,
LPVOID  reserved 
)

Definition at line 20 of file dllmain.c.

24 {
25  switch (dwReason)
26  {
27  case DLL_PROCESS_ATTACH:
28  DisableThreadLibraryCalls(hinstDll);
29  RegInitialize();
30  break;
31 
32  case DLL_PROCESS_DETACH:
34  RegCleanup();
35  UnloadNtMarta();
37  break;
38  }
39 
40  return TRUE;
41 }
#define TRUE
Definition: types.h:120
VOID CloseKsecDdHandle(VOID)
Definition: sysfunc.c:682
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
DWORD dwReason
Definition: misc.cpp:154
#define DLL_PROCESS_DETACH
Definition: compat.h:119
BOOL RegCleanup(VOID)
Definition: reg.c:93
VOID UnloadNtMarta(VOID)
Definition: misc.c:116
NTSTATUS CloseLogonLsaHandle(VOID)
Definition: logon.c:75
BOOL RegInitialize(VOID)
Definition: reg.c:70

◆ RegCleanup()

BOOL RegCleanup ( VOID  )

Definition at line 93 of file reg.c.

94 {
95  TRACE("RegCleanup()\n");
96 
99 
100  return TRUE;
101 }
static VOID CloseDefaultKeys(VOID)
Definition: reg.c:216
#define TRUE
Definition: types.h:120
#define TRACE(s)
Definition: solgame.cpp:4
static RTL_CRITICAL_SECTION HandleTableCS
Definition: reg.c:33
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

Referenced by DllMain().

◆ RegInitialize()

BOOL RegInitialize ( VOID  )

Definition at line 70 of file reg.c.

71 {
72  TRACE("RegInitialize()\n");
73 
74  /* Lazy init hack */
75  if (!DllInitialized)
76  {
77  ProcessHeap = RtlGetProcessHeap();
79  MAX_DEFAULT_HANDLES * sizeof(HANDLE));
81 
83  }
84 
85  return TRUE;
86 }
#define TRUE
Definition: types.h:120
static BOOLEAN DllInitialized
Definition: reg.c:38
static HANDLE ProcessHeap
Definition: reg.c:35
#define TRACE(s)
Definition: solgame.cpp:4
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
static RTL_CRITICAL_SECTION HandleTableCS
Definition: reg.c:33
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
static HANDLE DefaultHandleTable[MAX_DEFAULT_HANDLES]
Definition: reg.c:34
#define MAX_DEFAULT_HANDLES
Definition: reg.c:27

Referenced by CloseDefaultKeys(), DllMain(), MapDefaultKey(), RegDisablePredefinedCache(), RegDisablePredefinedCacheEx(), RegOpenUserClassesRoot(), and RegOverridePredefKey().

◆ UnloadNtMarta()

VOID UnloadNtMarta ( VOID  )

Definition at line 116 of file misc.c.

117 {
119  NULL) != NULL)
120  {
122  }
123 }
static PNTMARTA NtMarta
Definition: misc.c:20
smooth NULL
Definition: ftsmooth.c:416
#define FreeLibrary(x)
Definition: compat.h:405
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
HINSTANCE hDllInstance
Definition: advapi32.h:77
NTMARTA NtMartaStatic
Definition: misc.c:19

Referenced by DllMain().