https://git.reactos.org/?p=reactos.git;a=commitdiff;h=740beb65e6d92752630f5…
commit 740beb65e6d92752630f517624235e797c44b021
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Dec 30 03:18:17 2020 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Dec 30 19:38:26 2020 +0300
[DXDIAG] If ProcessorNameString not found, fall back to Identifier
It also should have its own routine for detecting CPU name, add a comment.
Windows XP and 2003 does have CPU name strings in dxdiagn.dll.
CORE-17413
---
base/applications/dxdiag/system.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/base/applications/dxdiag/system.c b/base/applications/dxdiag/system.c
index c10df851e4c..7359d0ca30f 100644
--- a/base/applications/dxdiag/system.c
+++ b/base/applications/dxdiag/system.c
@@ -196,6 +196,7 @@ InitializeSystemPage(HWND hwndDlg)
OSVERSIONINFO VersionInfo;
PVOID SMBiosBuf;
PCHAR DmiStrings[ID_STRINGS_MAX] = { 0 };
+ BOOL Result;
/* set date/time */
szTime[0] = L'\0';
@@ -322,7 +323,16 @@ InitializeSystemPage(HWND hwndDlg)
FreeSMBiosData(SMBiosBuf);
/* set processor string */
- if (GetRegValue(HKEY_LOCAL_MACHINE,
L"Hardware\\Description\\System\\CentralProcessor\\0",
L"ProcessorNameString", REG_SZ, szDesc, sizeof(szDesc)))
+ Result = GetRegValue(HKEY_LOCAL_MACHINE,
L"Hardware\\Description\\System\\CentralProcessor\\0",
L"ProcessorNameString", REG_SZ, szDesc, sizeof(szDesc));
+ if (!Result)
+ {
+ /* Processor Brand String not found */
+ /* FIXME: Implement CPU name detection routine */
+
+ /* Finally try to use Identifier string */
+ Result = GetRegValue(HKEY_LOCAL_MACHINE,
L"Hardware\\Description\\System\\CentralProcessor\\0", L"Identifier",
REG_SZ, szDesc, sizeof(szDesc));
+ }
+ if (Result)
{
TrimDmiStringW(szDesc);
/* FIXME retrieve current speed */