Getting the current CPU load ???
-
Is it possible to get the current CPU load/usage just as in the TaskManager ?
-
Is it possible to get the current CPU load/usage just as in the TaskManager ?
-
In regsistry there is a hidden branch - hkey_perfomance_data. Just read key values from it
Thanx. But how do you read/view hidden keys ?
-
Thanx. But how do you read/view hidden keys ?
Try sth like this below: HKEY hKey = 0; TCHAR vendorData [64]; DWORD data = 0; DWORD dataSize = 0; LONG result = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hKey); if(result == ERROR_SUCCESS) { //get Mhz: result = ::RegQueryValueEx(hKey, _T("~MHz"), NULL, NULL,(LPBYTE)&data, &dataSize); if(result == ERROR_SUCCESS) PROCESSOR IS data MHZ else IT IS UNKNOWN (fe: W9X) //get the vendor data: dataSize = sizeof (vendorData); result = ::RegQueryValueEx(hKey, _T("VendorIdentifier"), NULL, NULL, (LPBYTE)vendorData, &dataSize); } RegCloseKey (hKey); The above code works for me, but only on NT systems.