From b11644ae5a03874cccc9c93a58a5c284cc3fadb9 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 20 Apr 2018 20:33:45 +0200 Subject: [PATCH] GetBuildNumber export (revision << 8 | build) --- DDraw/dllmain.cpp | 6 ++++++ SilentPatchIII/SilentPatchIII.cpp | 6 ++++++ SilentPatchSA/SilentPatchSA.cpp | 6 ++++++ SilentPatchVC/SilentPatchVC.cpp | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/DDraw/dllmain.cpp b/DDraw/dllmain.cpp index 12d2d21..b5be8d6 100644 --- a/DDraw/dllmain.cpp +++ b/DDraw/dllmain.cpp @@ -223,4 +223,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } return TRUE; +} + +extern "C" __declspec(dllexport) +uint32_t GetBuildNumber() +{ + return (SILENTPATCH_REVISION_ID << 8) | SILENTPATCH_BUILD_ID; } \ No newline at end of file diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index fcd91ba..4be9acf 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -929,4 +929,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)&DllMain, &hDummyHandle); } return TRUE; +} + +extern "C" __declspec(dllexport) +uint32_t GetBuildNumber() +{ + return (SILENTPATCH_REVISION_ID << 8) | SILENTPATCH_BUILD_ID; } \ No newline at end of file diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 7f1e06c..2248d70 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -4910,4 +4910,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } } return TRUE; +} + +extern "C" __declspec(dllexport) +uint32_t GetBuildNumber() +{ + return (SILENTPATCH_REVISION_ID << 8) | SILENTPATCH_BUILD_ID; } \ No newline at end of file diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index bc9edfa..e39a14a 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -757,4 +757,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)&DllMain, &hDummyHandle); } return TRUE; +} + +extern "C" __declspec(dllexport) +uint32_t GetBuildNumber() +{ + return (SILENTPATCH_REVISION_ID << 8) | SILENTPATCH_BUILD_ID; } \ No newline at end of file