Add micro version to wxCheckOsVersion().
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user