mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add hook error detection in system hooking
This commit is contained in:
parent
0a319971dd
commit
e783309d76
@ -97,7 +97,12 @@ void WinSys_Attach()
|
||||
//DetourAttach(&(LPVOID&)VPeekMessageW, (PBYTE)HPeekMessage);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
DetourTransactionCommit();
|
||||
HRESULT hr = DetourTransactionCommit();
|
||||
if (hr != NO_ERROR)
|
||||
{
|
||||
// Failed to hook into the process, terminate
|
||||
Error(eDLL_T::COMMON, 0xBAD0C0DE, "Failed to detour process: error code = %08x\n", hr);
|
||||
}
|
||||
#endif // DEDICATED
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user