diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-04-21 16:29:26 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-04-21 16:29:26 +0200 |
commit | 5c3ee06f49d0061ef78042a637f5ca5dc787f2ab (patch) | |
tree | 94e49aa112f55cbdbb1323286d8606d6534303cf | |
parent | 408c78dcd7311588d7ceeb0f0e98d0831b500632 (diff) |
Core/Errors: Improved OS detection for windows crash reporting
-rw-r--r-- | src/server/shared/Debugging/WheatyExceptionReport.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index 63648f66e29..febc5ef3573 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -195,7 +195,23 @@ BOOL WheatyExceptionReport::_GetWindowsVersion(TCHAR* szVersion, DWORD cntMax) case VER_PLATFORM_WIN32_NT: // Test for the specific product family. if (osvi.dwMajorVersion == 6) - _tcsncat(szVersion, _T("Windows Vista or Windows Server 2008 "), cntMax); + { + #if WINVER < 0x0500 + if (osvi.wReserved[1] == VER_NT_WORKSTATION) + #else + if (osvi.wProductType == VER_NT_WORKSTATION) + #endif // WINVER < 0x0500 + { + if (osvi.dwMinorVersion == 1) + _tcsncat(szVersion, _T("Windows 7 "), cntMax); + else + _tcsncat(szVersion, _T("Windows Vista "), cntMax); + } + else if (osvi.dwMinorVersion == 1) + _tcsncat(szVersion, _T("Windows Server 2008 R2 "), cntMax); + else + _tcsncat(szVersion, _T("Windows Server 2008 "), cntMax); + } if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) _tcsncat(szVersion, _T("Microsoft Windows Server 2003 "), cntMax); if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) |