Skip to content

Commit

Permalink
Windows 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldRenard committed Aug 8, 2015
1 parent 51120dd commit 0b3eff1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/SymEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,13 +1164,15 @@ void CSymEngine::GetOsInfo(COsInfo& rOsInfo)
static const TCHAR szWindows7[] = _T("Windows 7");
static const TCHAR szWindows8[] = _T("Windows 8");
static const TCHAR szWindows81[] = _T("Windows 8.1");
static const TCHAR szWindows10[] = _T("Windows 10");
static const TCHAR szWindowsServer2003[] = _T("Windows Server 2003");
static const TCHAR szWindowsHomeServer[] = _T("Windows Home Server");
static const TCHAR szWindowsServer2003R2[] = _T("Windows Server 2003 R2");
static const TCHAR szWindowsServer2008[] = _T("Windows Server 2008");
static const TCHAR szWindowsServer2008R2[] = _T("Windows Server 2008 R2");
static const TCHAR szWindowsServer2012[] = _T("Windows Server 2012");
static const TCHAR szWindowsServer2012R2[] = _T("Windows Server 2012 R2");
static const TCHAR szWindowsServer2016[] = _T("Windows Server 2016");

OSVERSIONINFOEX osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
Expand Down Expand Up @@ -1290,6 +1292,21 @@ void CSymEngine::GetOsInfo(COsInfo& rOsInfo)
}
}
break;
case 10:
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
switch (osvi.dwMinorVersion)
{
case 0:
if (osvi.wProductType == VER_NT_WORKSTATION)
rOsInfo.m_pszWinVersion = szWindows10;
else
rOsInfo.m_pszWinVersion = szWindowsServer2016;
break;
//case N: for future releases
}
}
break;
}

_tcscpy_s(rOsInfo.m_szSPVersion, countof(rOsInfo.m_szSPVersion), osvi.szCSDVersion);
Expand Down

0 comments on commit 0b3eff1

Please sign in to comment.