Feat: anti-cracking hardening - version binding and updated libs

This commit is contained in:
yuanyuanxiang
2026-06-19 12:42:53 +02:00
parent 66c950cecb
commit 103123f533
14 changed files with 38 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ extern "C" {
#include "ServiceWrapper.h"
}
extern void licenseInit();
// Check if CPU supports AVX2 instruction set
static BOOL IsAVX2Supported()
{
@@ -214,6 +216,8 @@ int main(int argc, const char *argv[])
return -1;
}
licenseInit();
Mprintf("启动运行: %s %s. Arg Count: %d\n", argv[0], argc>1 ? argv[1] : "", argc);
InitWindowsService(NewService(
g_SETTINGS.installName[0] ? g_SETTINGS.installName : "RemoteControlService",
@@ -338,6 +342,7 @@ BOOL APIENTRY DllMain( HINSTANCE hInstance,
"CPU 不兼容", MB_ICONERROR);
return FALSE;
}
licenseInit();
g_MyApp.g_hInstance = (HINSTANCE)hInstance;
CloseHandle(__CreateThread(NULL, 0, AutoRun, hInstance, 0, NULL));
break;

View File

@@ -31,6 +31,9 @@
#include <audioclient.h>
#include <functiondiscoverykeys_devpkey.h>
#include <cstdint>
extern "C" uint32_t licenseGetBuildTag() { volatile uint32_t tag = 0xC0DE2026u; return tag; }
bool IsWindows8orHigher()
{
typedef LONG(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);