mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
46 lines
679 B
C++
46 lines
679 B
C++
#include <string>
|
|
#include <Windows.h>
|
|
|
|
#include "r5dev.h"
|
|
#include "console.h"
|
|
#include "utilities.h"
|
|
#include "hooks.h"
|
|
|
|
__declspec(dllexport) void DummyExport()
|
|
{
|
|
// Required for detours.
|
|
}
|
|
|
|
//
|
|
// Main
|
|
//
|
|
|
|
void InitializeR5Dev()
|
|
{
|
|
SetupConsole();
|
|
InstallHooks();
|
|
printf("R5 Dev -- Initialized...\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;
|
|
} |