Add wxCheckOsVersion() to implement platform based OS version checks.
Windows implements VerifyVersionInfo api since Win2k. Starting with Windows 8.1 GetVersionEx is deprecated and may not return the expected version number if the application does not contain the correct compatibility information in its manifest. VerifyVersionInfo works independent of manifest in the executable (and is the recommend way to check). Existing code may already use wxPlatformInfo::CheckOSVersion() so the method forwards the call to wxCheckOsVersion if initialized for the current system.
This commit is contained in:
@@ -879,6 +879,18 @@ wxString wxGetOsDescription();
|
||||
*/
|
||||
wxOperatingSystemId wxGetOsVersion(int* major = NULL, int* minor = NULL);
|
||||
|
||||
/**
|
||||
Returns @true the version of the operating system on which the program
|
||||
is running under is the same or later than the given version.
|
||||
|
||||
@since 3.1.0
|
||||
|
||||
@see wxGetOsVersion(), wxPlatformInfo
|
||||
|
||||
@header{wx/utils.h}
|
||||
*/
|
||||
bool wxCheckOsVersion(int majorVsn, int minorVsn = 0);
|
||||
|
||||
/**
|
||||
Returns @true if the operating system the program is running under is 64
|
||||
bit. The check is performed at run-time and may differ from the value
|
||||
|
Reference in New Issue
Block a user