diff --git a/docs/changes.txt b/docs/changes.txt index 6f3aa89244..afabf1e762 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -181,7 +181,7 @@ wxMSW: - Correct wxGetOsDescription() for Windows 10 (Tobias Taschner). - Make wxListCtrl &c appearance more native on modern systems (Tobias Taschner). - Don't send wxActivateEvent for minimized windows (bzcdr). -- Return correct OS version under Windows 8 and later. +- Return correct OS version under Windows 8.1 and later. wxOSX/Cocoa: diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 4e17bbe659..a86dec2974 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1009,13 +1009,16 @@ OSVERSIONINFOEXW wxGetWindowsVersionInfo() // RtlGetVersion() directly, if it is available. #if wxUSE_DYNLIB_CLASS wxDynamicLibrary dllNtDll; - if ( dllNtDll.RawLoad(wxS("ntdll.dll")) ) + if ( dllNtDll.Load(wxS("ntdll.dll"), wxDL_VERBATIM | wxDL_QUIET) ) { typedef LONG /* NTSTATUS */ (WINAPI *RtlGetVersion_t)(OSVERSIONINFOEXW*); RtlGetVersion_t wxDL_INIT_FUNC(pfn, RtlGetVersion, dllNtDll); - if ( pfnRtlGetVersion && pfnRtlGetVersion(&info) ) + if ( pfnRtlGetVersion && + (pfnRtlGetVersion(&info) == 0 /* STATUS_SUCCESS */) ) + { return info; + } } #endif // wxUSE_DYNLIB_CLASS