Originally Posted by
alex_v
So, question is: how do I hook player closing wow client?
If your way is "debug" then you can simple
Code:
void EnterDebugLoop()
{
if (DebugActiveProcess(dwProcessId))
{
DebugSetProcessKillOnExit(0);
while (true)
{
if (!WaitForDebugEvent(&DebugEvent, 500))
continue;
dwContinueStatus = DBG_CONTINUE;
if (DebugEvent.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT || DebugEvent.dwDebugEventCode == RIP_EVENT)
{
GameExit = true;
RemoveDebug();
}
ContinueDebugEvent(DebugEvent.dwProcessId, DebugEvent.dwThreadId, dwContinueStatus);
}
}
else
PrintError("Already attached");
}