+static bool verify_os_build(const DWORD build)
+{
+ OSVERSIONINFOEXW osvi;
+ DWORDLONG dwlConditionMask = 0;
+ initialize_os_version(&osvi);
+
+ //Initialize the OSVERSIONINFOEX structure
+ osvi.dwBuildNumber = build;
+ osvi.dwPlatformId = VER_PLATFORM_WIN32_NT;
+
+ //Initialize the condition mask
+ VER_SET_CONDITION(dwlConditionMask, VER_BUILDNUMBER, VER_GREATER_EQUAL);
+ VER_SET_CONDITION(dwlConditionMask, VER_PLATFORMID, VER_EQUAL);
+
+ // Perform the test
+ const BOOL ret = rtl_verify_version(&osvi, VER_BUILDNUMBER | VER_PLATFORMID, dwlConditionMask);
+
+ //Error checking
+ if (!ret)
+ {
+ if (GetLastError() != ERROR_OLD_WIN_VERSION)
+ {
+ qWarning("VerifyVersionInfo() system call has failed!");
+ }
+ }
+
+ return (ret != FALSE);
+}
+
+static bool get_real_os_version(unsigned int *major, unsigned int *minor, unsigned int *build, bool *pbOverride)