mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[SYSDM] If ProcessorNameString not found, fall back to Identifier
Also add a comment about CIM_Processor. CORE-17413
This commit is contained in:
parent
b96e88894a
commit
e9f9f83c0a
1 changed files with 15 additions and 0 deletions
|
@ -479,15 +479,30 @@ static VOID GetSystemInformation(HWND hwnd)
|
||||||
*/
|
*/
|
||||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, ProcKey, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, ProcKey, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
INT PrevMachineLine;
|
||||||
|
|
||||||
SetRegTextData(hwnd, hKey, _T("VendorIdentifier"), CurMachineLine);
|
SetRegTextData(hwnd, hKey, _T("VendorIdentifier"), CurMachineLine);
|
||||||
CurMachineLine++;
|
CurMachineLine++;
|
||||||
|
|
||||||
|
PrevMachineLine = CurMachineLine;
|
||||||
CurMachineLine += SetProcNameString(hwnd,
|
CurMachineLine += SetProcNameString(hwnd,
|
||||||
hKey,
|
hKey,
|
||||||
_T("ProcessorNameString"),
|
_T("ProcessorNameString"),
|
||||||
CurMachineLine,
|
CurMachineLine,
|
||||||
CurMachineLine + 1);
|
CurMachineLine + 1);
|
||||||
|
|
||||||
|
if (CurMachineLine == PrevMachineLine)
|
||||||
|
{
|
||||||
|
/* TODO: Try obtaining CPU name from WMI (i.e. CIM_Processor) */
|
||||||
|
|
||||||
|
/* Brand String is not available, use Identifier instead */
|
||||||
|
CurMachineLine += SetProcNameString(hwnd,
|
||||||
|
hKey,
|
||||||
|
_T("Identifier"),
|
||||||
|
CurMachineLine,
|
||||||
|
CurMachineLine + 1);
|
||||||
|
}
|
||||||
|
|
||||||
SetProcSpeed(hwnd, hKey, _T("~MHz"), CurMachineLine);
|
SetProcSpeed(hwnd, hKey, _T("~MHz"), CurMachineLine);
|
||||||
CurMachineLine++;
|
CurMachineLine++;
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
Loading…
Reference in a new issue