From 09422a21a79592bb1b89fee33d26b2e2e4c6cfb7 Mon Sep 17 00:00:00 2001 From: BlackINT3 Date: Tue, 2 Nov 2021 11:07:57 +0800 Subject: [PATCH] Fix build number error #60. --- src/OpenArk/common/win-wrapper/win-wrapper.cpp | 3 ++- src/OpenArkDrv/common/common.cpp | 1 + src/OpenArkDrv/common/common.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/OpenArk/common/win-wrapper/win-wrapper.cpp b/src/OpenArk/common/win-wrapper/win-wrapper.cpp index ef2a947..c6ecdf0 100644 --- a/src/OpenArk/common/win-wrapper/win-wrapper.cpp +++ b/src/OpenArk/common/win-wrapper/win-wrapper.cpp @@ -706,7 +706,7 @@ std::string OsWinVersionInfo() GetVersionEx((OSVERSIONINFO *)&os); if (major == 10 && minor == 0) { if (os.dwPlatformId == VER_PLATFORM_WIN32_NT) { - if (release > 19043) winver = "Windows 11"; + if (release >= 22000) winver = "Windows 11"; else winver = "Windows 10"; } else { switch (release) { @@ -790,6 +790,7 @@ std::string OsReleaseNumber() std::make_pair(19041, "2004"), std::make_pair(19042, "20H2"), std::make_pair(19043, "21H1"), + std::make_pair(19044, "21H2"), std::make_pair(22000, "21H2"), }; std::map tables(pairs, pairs + _countof(pairs)); diff --git a/src/OpenArkDrv/common/common.cpp b/src/OpenArkDrv/common/common.cpp index 2ba80f0..578f2f5 100644 --- a/src/OpenArkDrv/common/common.cpp +++ b/src/OpenArkDrv/common/common.cpp @@ -76,6 +76,7 @@ NTOS_VERSION_X OsNtVersion() if (info.dwBuildNumber == 19041) return _NTOS_WIN10_2004; if (info.dwBuildNumber == 19042) return _NTOS_WIN10_20H2; if (info.dwBuildNumber == 19043) return _NTOS_WIN10_21H1; + if (info.dwBuildNumber == 19043) return _NTOS_WIN10_21H2; if (info.dwBuildNumber == 22000) return _NTOS_WIN11_21H2; } default: diff --git a/src/OpenArkDrv/common/common.h b/src/OpenArkDrv/common/common.h index af88026..2688b26 100644 --- a/src/OpenArkDrv/common/common.h +++ b/src/OpenArkDrv/common/common.h @@ -62,6 +62,7 @@ typedef enum { _NTOS_WIN10_2004, //19041 _NTOS_WIN10_20H2, //19042 _NTOS_WIN10_21H1, //19043 + _NTOS_WIN10_21H2, //19044 _NTOS_WIN11_21H2, //22000 } NTOS_VERSION_X, *PNTOS_VERSION_X;