r5sdk/r5dev/launcher/prx.cpp
Kawe Mazidjatari e32cc6ae6a Code overhaul
Moved every pattern to IDetour interface. This allows for debugging patterns scans more easily, and create threads during pattern searching (Operation is now fired in APIENTRY).

Also cleaned up some unused code/extraneous comments.
Slightly increased performance by purging duplicate patterns.
Made variable search less dependent from other results (except if pattern-to-scan results is within the same header)
2022-04-18 03:35:08 +02:00

24 lines
623 B
C++

#include <core/stdafx.h>
#include <core/init.h>
#include <launcher/prx.h>
//-----------------------------------------------------------------------------
// Purpose: shutdown and unload SDK
//-----------------------------------------------------------------------------
void h_exit_or_terminate_process(UINT uExitCode)
{
R5Dev_Shutdown();
HANDLE h = GetCurrentProcess();
TerminateProcess(h, uExitCode);
}
void PRX_Attach()
{
DetourAttach((LPVOID*)&v_exit_or_terminate_process, &h_exit_or_terminate_process);
}
void PRX_Detach()
{
DetourAttach((LPVOID*)&v_exit_or_terminate_process, &h_exit_or_terminate_process);
}