mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
Patch from hto@mail dot cnt dot ru for sysdm
See issue #1856 for more details. svn path=/trunk/; revision=24857
This commit is contained in:
parent
5d08bbb40d
commit
c2c4ceff11
1 changed files with 45 additions and 4 deletions
|
@ -110,6 +110,46 @@ SetRegTextData(HWND hwnd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
SetProcName(HWND hwnd,
|
||||||
|
HKEY hKey,
|
||||||
|
LPTSTR Value,
|
||||||
|
UINT uID)
|
||||||
|
{
|
||||||
|
LPTSTR lpBuf = NULL;
|
||||||
|
DWORD BufSize = 0;
|
||||||
|
DWORD Type;
|
||||||
|
|
||||||
|
if (RegQueryValueEx(hKey,
|
||||||
|
Value,
|
||||||
|
NULL,
|
||||||
|
&Type,
|
||||||
|
NULL,
|
||||||
|
&BufSize) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
lpBuf = HeapAlloc(GetProcessHeap(),
|
||||||
|
0,
|
||||||
|
BufSize);
|
||||||
|
if (!lpBuf) return;
|
||||||
|
|
||||||
|
if (RegQueryValueEx(hKey,
|
||||||
|
Value,
|
||||||
|
NULL,
|
||||||
|
&Type,
|
||||||
|
(PBYTE)lpBuf,
|
||||||
|
&BufSize) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
SetDlgItemText(hwnd,
|
||||||
|
uID,
|
||||||
|
lpBuf + _tcsspn(lpBuf, _T(" ")));
|
||||||
|
}
|
||||||
|
|
||||||
|
HeapFree(GetProcessHeap(),
|
||||||
|
0,
|
||||||
|
lpBuf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
SetProcSpeed(HWND hwnd,
|
SetProcSpeed(HWND hwnd,
|
||||||
HKEY hKey,
|
HKEY hKey,
|
||||||
|
@ -171,7 +211,7 @@ GetSystemInformation(HWND hwnd)
|
||||||
_T("VendorIdentifier"),
|
_T("VendorIdentifier"),
|
||||||
IDC_PROCESSORMANUFACTURER);
|
IDC_PROCESSORMANUFACTURER);
|
||||||
|
|
||||||
SetRegTextData(hwnd,
|
SetProcName(hwnd,
|
||||||
hKey,
|
hKey,
|
||||||
_T("ProcessorNameString"),
|
_T("ProcessorNameString"),
|
||||||
IDC_PROCESSOR);
|
IDC_PROCESSOR);
|
||||||
|
@ -322,3 +362,4 @@ GeneralPageProc(HWND hwndDlg,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue