base
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#include "../../SHSSDK.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <crtdbg.h>
|
||||
#define SET_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag((a) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
|
||||
#define CLEAR_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
|
||||
#else // _DEBUG
|
||||
#define SET_CRT_DEBUG_FIELD(a) ((void) 0)
|
||||
#define CLEAR_CRT_DEBUG_FIELD(a) ((void) 0)
|
||||
#endif // _DEBUG
|
||||
|
||||
HINSTANCE g_hInst;
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
SET_CRT_DEBUG_FIELD( _CRTDBG_LEAK_CHECK_DF | _CRTDBG_DELAY_FREE_MEM_DF );
|
||||
//_CrtSetBreakAlloc(160);
|
||||
#endif
|
||||
g_hInst = (HINSTANCE)hModule;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
Reference in New Issue
Block a user