r5sdk/r5dev/dllmain.cpp
Amos 348cfee29c Implements hexdump utility and light code improvements
New hexdump utility,
New simple Origin hooks
Default back to hardcoded offsets for faster launch times
2021-05-17 07:54:13 -07:00

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;
}