mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Move shared utils to shared directory * Partial cleanup of existing codebase * Add precompiled header for debug configurations
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#include "pch.h"
|
|
#include "dllmain.h"
|
|
#include "hooks.h"
|
|
#include "console.h"
|
|
|
|
//#############################################################################
|
|
// INITIALIZATION
|
|
//#############################################################################
|
|
|
|
void InitializeR5Dedicated()
|
|
{
|
|
SetupConsole();
|
|
InstallHooks();
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
printf("| R5 DEDICATED SERVER --------------------------------------------------- |\n");
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
printf("\n");
|
|
}
|
|
|
|
void TerminateR5Dedicated()
|
|
{
|
|
FreeConsole();
|
|
RemoveHooks();
|
|
}
|
|
|
|
//#############################################################################
|
|
// ENTRYPOINT
|
|
//#############################################################################
|
|
|
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
|
|
switch (dwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
InitializeR5Dedicated();
|
|
break;
|
|
}
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
{
|
|
TerminateR5Dedicated();
|
|
break;
|
|
}
|
|
}
|
|
|
|
return TRUE;
|
|
}
|