Add micro version to wxCheckOsVersion().

This commit is contained in:
Tobias Taschner
2016-02-26 16:22:54 +01:00
parent 84fbc12f2d
commit 3bdb4c4b21
6 changed files with 23 additions and 15 deletions

View File

@@ -1281,22 +1281,26 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin, int *verMicro)
return s_version.os;
}
bool wxCheckOsVersion(int majorVsn, int minorVsn)
bool wxCheckOsVersion(int majorVsn, int minorVsn, int microVsn)
{
OSVERSIONINFOEX osvi;
wxZeroMemory(osvi);
osvi.dwOSVersionInfoSize = sizeof(osvi);
DWORDLONG const dwlConditionMask =
::VerSetConditionMask(
::VerSetConditionMask(
::VerSetConditionMask(
0, VER_MAJORVERSION, VER_GREATER_EQUAL),
VER_MINORVERSION, VER_GREATER_EQUAL);
VER_MINORVERSION, VER_GREATER_EQUAL),
VER_BUILDNUMBER, VER_GREATER_EQUAL);
osvi.dwMajorVersion = majorVsn;
osvi.dwMinorVersion = minorVsn;
osvi.dwBuildNumber = microVsn;
return ::VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask) != FALSE;
return ::VerifyVersionInfo(&osvi,
VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER, dwlConditionMask) != FALSE;
}
wxWinVersion wxGetWinVersion()