-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.cpp
More file actions
23 lines (21 loc) · 740 Bytes
/
main.cpp
File metadata and controls
23 lines (21 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "defines.h"
#include "Core.h"
LOG_DECLARE;
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved){
DisableThreadLibraryCalls(hModule);
if(dwReason == DLL_PROCESS_ATTACH){
int res;
LOG_INIT("jt2");
LOG_DEBUG_MF(L"main.cpp", 0, L"DLL", L"Attach", L"in process...");
JungleTime::Core::singleton = new JungleTime::Core();
res = JungleTime::Core::singleton->Init();
LOG_VERBOSE_MF(L"main.cpp", 0, L"DLL", L"Attach", L"complete");
return res;
}
else if(dwReason == DLL_PROCESS_DETACH){
LOG_DEBUG_MF(L"main.cpp", 0, L"DLL", L"Detach", L"in progress...");
delete JungleTime::Core::singleton;
LOG_VERBOSE_MF(L"main.cpp", 0, L"DLL", L"Detach", L"complete");
}
return TRUE;
}