1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
-
- #include "pch.h"
- #include "CBaseGloabl.h"
- CBaseGloabl* g_pBaseGloabl = NULL;
- HMODULE g_hDllModule = NULL;
- SYSMODULE IBaseGloablModule* WINAPI GetBaseGlobalInstance()
- {
-
- if (!g_pBaseGloabl)
- g_pBaseGloabl = new CBaseGloabl;
- g_pBaseGloabl->AddRef();
- return g_pBaseGloabl;
- }
- SYSMODULE BOOL WINAPI ReleaseBaseGlobalInstance()
- {
- if (!g_pBaseGloabl)
- return FALSE;
- if (g_pBaseGloabl->Release() == 0)
- {
- g_pBaseGloabl = NULL;
- }
- return TRUE;
- }
- BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- {
- g_hDllModule = (HMODULE)hModule;
- }
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
|