Add Windows 10 Release ID to About info
Adds the Windows 10 (and Server 2016) Release ID to the info in the About Wireshark blurb. The ID displayed in parentheses, e.g. Running on 64-bit Windows 10 (1803), build 17134 Change-Id: I1bbce27e149dbf6da6da7847ad1f7dd861176ece Reviewed-on: https://code.wireshark.org/review/28475 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
1f5c420508
commit
bd3188b072
|
@ -184,6 +184,7 @@ typedef LONG (WINAPI * RtlGetVersionProc) (OSVERSIONINFOEX *);
|
|||
#ifndef STATUS_SUCCESS
|
||||
#define STATUS_SUCCESS 0
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#endif // _WIN32
|
||||
|
||||
/*
|
||||
|
@ -350,6 +351,8 @@ get_os_version_info(GString *str)
|
|||
|
||||
case 10: {
|
||||
gboolean is_nt_workstation;
|
||||
TCHAR ReleaseId[10];
|
||||
DWORD ridSize = _countof(ReleaseId);
|
||||
|
||||
if (system_info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
g_string_append(str, "64-bit ");
|
||||
|
@ -359,6 +362,10 @@ get_os_version_info(GString *str)
|
|||
switch (win_version_info.dwMinorVersion) {
|
||||
case 0:
|
||||
g_string_append_printf(str, is_nt_workstation ? "Windows 10" : "Windows Server 2016");
|
||||
if (RegGetValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",
|
||||
L"ReleaseId", RRF_RT_REG_SZ, NULL, &ReleaseId, &ridSize) == ERROR_SUCCESS) {
|
||||
g_string_append_printf(str, " (%s)", utf_16to8(ReleaseId));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_string_append_printf(str, "Windows NT, unknown version %lu.%lu",
|
||||
|
|
Loading…
Reference in New Issue