1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

fix hook_exit

This commit is contained in:
FunkyFr3sh 2023-08-04 08:41:14 +02:00
parent e575b07d2e
commit 59f8da56da

View File

@ -559,16 +559,16 @@ void hook_exit()
g_hook_active = FALSE;
hook_revert((HOOKLIST*)&g_hooks);
}
#if defined(_DEBUG) && defined(_MSC_VER)
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourDetach((PVOID*)&real_SetUnhandledExceptionFilter, (PVOID)fake_SetUnhandledExceptionFilter);
DetourTransactionCommit();
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourDetach((PVOID*)&real_SetUnhandledExceptionFilter, (PVOID)fake_SetUnhandledExceptionFilter);
DetourTransactionCommit();
real_SetUnhandledExceptionFilter(g_dbg_exception_filter);
real_SetUnhandledExceptionFilter(g_dbg_exception_filter);
#endif
hook_patch_iat(GetModuleHandle("AcGenral"), TRUE, "user32.dll", "SetWindowsHookExA", (PROC)fake_SetWindowsHookExA);
hook_patch_iat(GetModuleHandle("AcGenral"), TRUE, "user32.dll", "SetWindowsHookExA", (PROC)fake_SetWindowsHookExA);
}
}