StelLogger.cpp   StelLogger.cpp 
skipping to change at line 254 skipping to change at line 254
DWORD dwType = REG_DWORD; DWORD dwType = REG_DWORD;
DWORD numVal = 0; DWORD numVal = 0;
DWORD dwSize = sizeof(numVal); DWORD dwSize = sizeof(numVal);
// iterate over the processors listed in the registry // iterate over the processors listed in the registry
QString procKey = "Hardware\\Description\\System\\CentralProcessor"; QString procKey = "Hardware\\Description\\System\\CentralProcessor";
LONG lRet = ERROR_SUCCESS; LONG lRet = ERROR_SUCCESS;
int i; int i;
for(i = 0; lRet == ERROR_SUCCESS; i++) for(i = 0; lRet == ERROR_SUCCESS; i++)
{ {
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, lRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
TEXT(qPrintable(QString("%1\\%2").ar qPrintable(QString("%1\\%2").arg(pro
g(procKey).arg(i))), cKey).arg(i)),
0, KEY_QUERY_VALUE, &hKey); 0, KEY_QUERY_VALUE, &hKey);
if(lRet == ERROR_SUCCESS) if(lRet == ERROR_SUCCESS)
{ {
if(RegQueryValueEx(hKey, "~MHz", NULL, &dwType, (LPB YTE)&numVal, &dwSize) == ERROR_SUCCESS) if(RegQueryValueExA(hKey, "~MHz", NULL, &dwType, (LP BYTE)&numVal, &dwSize) == ERROR_SUCCESS)
writeLog(QString("Processor speed: %1 MHz"). arg(numVal)); writeLog(QString("Processor speed: %1 MHz"). arg(numVal));
else else
writeLog("Could not get processor speed."); writeLog("Could not get processor speed.");
} }
// can you believe this trash? // can you believe this trash?
dwType = REG_SZ; dwType = REG_SZ;
char nameStr[512]; char nameStr[512];
DWORD nameSize = sizeof(nameStr); DWORD nameSize = sizeof(nameStr);
if (lRet == ERROR_SUCCESS) if (lRet == ERROR_SUCCESS)
{ {
if (RegQueryValueEx(hKey, "ProcessorNameString", NUL L, &dwType, (LPBYTE)&nameStr, &nameSize) == ERROR_SUCCESS) if (RegQueryValueExA(hKey, "ProcessorNameString", NU LL, &dwType, (LPBYTE)&nameStr, &nameSize) == ERROR_SUCCESS)
writeLog(QString("Processor name: %1").arg(n ameStr)); writeLog(QString("Processor name: %1").arg(n ameStr));
else else
writeLog("Could not get processor name."); writeLog("Could not get processor name.");
} }
RegCloseKey(hKey); RegCloseKey(hKey);
} }
if(i == 0) if(i == 0)
writeLog("Could not get processor info."); writeLog("Could not get processor info.");
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/