#include <thread>
#include "Hooks.h"
HINSTANCE HThisModule;
void InitialThread()
{
using namespace std::literals::chrono_literals;
std::this_thread::sleep_for(15s); //crashhandler.dll delay wait for replacing via Steam
Hooks::Init();
while (true)
{
std::this_thread::sleep_for(5s); //let it
}
FreeLibraryAndExitThread(HThisModule, 0);
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH && GetModuleHandleA("csgo.exe"))
{
DisableThreadLibraryCalls(hModule);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InitialThread, NULL, NULL, NULL);
return TRUE;
}
return TRUE;
}