Verify plutonium version

This commit is contained in:
Federico Cecchetto 2021-08-31 20:58:15 +02:00
parent 76842b4bce
commit c9543dfbe4
2 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,16 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
const auto value = *reinterpret_cast<DWORD*>(0x20600000);
if (value != 0x77E0B164)
{
printf("\x1b[31m\n**************************************************************************************\n\n");
printf("This version of \x1b[33miw5-gsc-utils\x1b[31m is outdated.\n");
printf("Download the latest dll from here:\x1b[34m https://github.com/fedddddd/iw5-gsc-utils/releases\ \x1b[31m\n");
printf("\n**************************************************************************************\n\n\x1b[37m");
return FALSE;
}
component_loader::post_unpack();
}

View File

@ -2,8 +2,10 @@
#pragma warning(disable: 4018)
#pragma warning(disable: 4146)
#pragma warning(disable: 4129)
#pragma warning(disable: 4244)
#pragma warning(disable: 4267)
#pragma warning(disable: 4996)
#pragma warning(disable: 26812)
#define DLL_EXPORT extern "C" __declspec(dllexport)