mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
24 lines
619 B
C++
24 lines
619 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*)&exit_or_terminate_process, &h_exit_or_terminate_process);
|
||
|
}
|
||
|
|
||
|
void PRX_Detach()
|
||
|
{
|
||
|
DetourAttach((LPVOID*)&exit_or_terminate_process, &h_exit_or_terminate_process);
|
||
|
}
|