[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
This commit is contained in:
Stanislav Motylkov 2020-12-30 03:18:17 +03:00
parent e9f9f83c0a
commit 740beb65e6
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92

View file

@ -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 */