wxhelper/src/dllMain.cc

33 lines
609 B
C++
Raw Permalink Normal View History

2023-03-31 21:21:35 +08:00
#include "pch.h"
#include "hide_module.h"
#include "global_context.h"
using namespace wxhelper;
2022-12-21 20:30:44 +08:00
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
LPVOID lpReserved) {
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH: {
2023-03-31 21:21:35 +08:00
DisableThreadLibraryCalls(hModule);
GlobalContext::GetInstance().initialize(hModule);
2022-12-21 20:30:44 +08:00
break;
}
case DLL_THREAD_ATTACH: {
break;
}
case DLL_THREAD_DETACH: {
break;
}
case DLL_PROCESS_DETACH: {
2023-03-31 21:21:35 +08:00
GlobalContext::GetInstance().finally();
2022-12-21 20:30:44 +08:00
break;
}
}
return TRUE;
}