diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-10-26 22:30:40 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-10-26 22:30:40 +0200 |
commit | d7ff24c1e08b4dbbafc7ed8ed1f8eb34c12e798b (patch) | |
tree | 88daa05ef266b532037aac6e7a37e44acb199d03 /src/common/util.cpp | |
parent | Merge pull request #4539 (diff) | |
parent | Utils: add support for newer Windows versions detection (diff) | |
download | monero-d7ff24c1e08b4dbbafc7ed8ed1f8eb34c12e798b.tar.xz |
Merge pull request #4545
93a88d73 Utils: add support for newer Windows versions detection (Gregory Lemercier)
Diffstat (limited to 'src/common/util.cpp')
-rw-r--r-- | src/common/util.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index f91230528..43973c511 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -308,10 +308,19 @@ namespace tools StringCchCopy(pszOS, BUFSIZE, TEXT("Microsoft ")); // Test for the specific product. + if ( osvi.dwMajorVersion == 10 ) + { + if ( osvi.dwMinorVersion == 0 ) + { + if( osvi.wProductType == VER_NT_WORKSTATION ) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows 10 ")); + else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2016 " )); + } + } if ( osvi.dwMajorVersion == 6 ) { - if( osvi.dwMinorVersion == 0 ) + if ( osvi.dwMinorVersion == 0 ) { if( osvi.wProductType == VER_NT_WORKSTATION ) StringCchCat(pszOS, BUFSIZE, TEXT("Windows Vista ")); @@ -325,6 +334,20 @@ namespace tools else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 " )); } + if ( osvi.dwMinorVersion == 2 ) + { + if( osvi.wProductType == VER_NT_WORKSTATION ) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows 8 ")); + else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2012 " )); + } + + if ( osvi.dwMinorVersion == 3 ) + { + if( osvi.wProductType == VER_NT_WORKSTATION ) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows 8.1 ")); + else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2012 R2 " )); + } + pGPI = (PGPI) GetProcAddress( GetModuleHandle(TEXT("kernel32.dll")), "GetProductInfo"); |