solve some issues according to code analysis result

This commit is contained in:
yuanyuanxiang
2024-12-27 01:40:40 +08:00
parent cdded1687d
commit a2975d9471
19 changed files with 106 additions and 50 deletions

View File

@@ -17,8 +17,16 @@ std::string getSystemName()
//<2F><><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD>Ϊwin8.1<EFBFBD><EFBFBD>win10
typedef void(__stdcall*NTPROC)(DWORD*, DWORD*, DWORD*);
HINSTANCE hinst = LoadLibrary("ntdll.dll");
if (hinst == NULL)
{
return vname;
}
DWORD dwMajor, dwMinor, dwBuildNumber;
NTPROC proc = (NTPROC)GetProcAddress(hinst, "RtlGetNtVersionNumbers");
if (proc==NULL)
{
return vname;
}
proc(&dwMajor, &dwMinor, &dwBuildNumber);
if (dwMajor == 6 && dwMinor == 3) //win 8.1
{