(Gast)
n/a Beiträge
|
Re: openlibsys.org Open source driver
6. Mai 2008, 20:33
I did it for AMD core reading...
However it needs testing so people with AMD 64 K7 cpus.
People please test!
Needs translation!
Delphi-Quellcode:
void ReadTemp(HWND hWnd)
{
DWORD eax, edx;
RdmsrEx(0x19C, &eax, &edx, 1);
eax &= 0x007F0000;
eax = eax >> 16;
SetDlgItemInt(hWnd, IDC_STATIC1, -(int)eax, TRUE);
RdmsrEx(0x19C, &eax, &edx, 1 << 1);
eax &= 0x007F0000;
eax = eax >> 16;
SetDlgItemInt(hWnd, IDC_STATIC2, -(int)eax, TRUE);
if(numCPU == 4){
RdmsrEx(0x19C, &eax, &edx, 1 << 2);
eax &= 0x007F0000;
eax = eax >> 16;
SetDlgItemInt(hWnd, IDC_STATIC3, -(int)eax, TRUE);
RdmsrEx(0x19C, &eax, &edx, 1 << 3);
eax &= 0x007F0000;
eax = eax >> 16;
SetDlgItemInt(hWnd, IDC_STATIC4, -(int)eax, TRUE);
}
}
|
|
Zitat
|