mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
New hexdump utility, New simple Origin hooks Default back to hardcoded offsets for faster launch times
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#include <string>
|
|
#include <Windows.h>
|
|
|
|
#include "r5dev.h"
|
|
#include "console.h"
|
|
#include "utilities.h"
|
|
#include "hooks.h"
|
|
|
|
//---------------------------------------------------------------------------------
|
|
// Main
|
|
//---------------------------------------------------------------------------------
|
|
|
|
void InitializeR5Dev()
|
|
{
|
|
SetupConsole();
|
|
InstallHooks();
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
printf("| R5 DEV -- INITIALIZED ------------------------------------------------- |\n");
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
}
|
|
|
|
void TerminateR5Dev()
|
|
{
|
|
RemoveHooks();
|
|
FreeConsole();
|
|
}
|
|
|
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
|
|
switch (dwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
InitializeR5Dev();
|
|
break;
|
|
}
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
{
|
|
TerminateR5Dev();
|
|
break;
|
|
}
|
|
}
|
|
|
|
return TRUE;
|
|
} |