summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src/cpuusage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AutoShutdown/src/cpuusage.cpp')
-rw-r--r--plugins/AutoShutdown/src/cpuusage.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp
index ba4ccd1107..7ca145d875 100644
--- a/plugins/AutoShutdown/src/cpuusage.cpp
+++ b/plugins/AutoShutdown/src/cpuusage.cpp
@@ -31,13 +31,13 @@ static BOOL WinNT_PerfStatsSwitch(TCHAR *pszServiceName, BOOL fDisable)
DWORD dwData, dwDataSize;
BOOL fSwitched = FALSE;
/* Win2000+ */
- if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Services"), 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyServices)) {
+ if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Services", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyServices)) {
if (!RegOpenKeyEx(hKeyServices, pszServiceName, 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyService)) {
- if (!RegOpenKeyEx(hKeyService, _T("Performance"), 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyPerf)) {
+ if (!RegOpenKeyEx(hKeyService, L"Performance", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyPerf)) {
dwDataSize = sizeof(DWORD);
- if (!RegQueryValueEx(hKeyPerf, _T("Disable Performance Counters"), NULL, NULL, (BYTE*)&dwData, &dwDataSize))
+ if (!RegQueryValueEx(hKeyPerf, L"Disable Performance Counters", NULL, NULL, (BYTE*)&dwData, &dwDataSize))
if ((dwData != 0) != fDisable)
- fSwitched = !RegSetValueEx(hKeyPerf, _T("Disable Performance Counters"), 0, REG_DWORD, (BYTE*)&fDisable, dwDataSize);
+ fSwitched = !RegSetValueEx(hKeyPerf, L"Disable Performance Counters", 0, REG_DWORD, (BYTE*)&fDisable, dwDataSize);
RegCloseKey(hKeyPerf);
}
RegCloseKey(hKeyService);
@@ -95,7 +95,7 @@ static void WinNT_PollThread(void *vparam)
dwCounterId = 6; /* '% processor time' counter */
pwszInstanceName = L"_Total"; /* '_Total' instance */
_itot_s(dwObjectId, wszValueName, 10);
- fSwitched = WinNT_PerfStatsSwitch(_T("PerfOS"), FALSE);
+ fSwitched = WinNT_PerfStatsSwitch(L"PerfOS", FALSE);
/* poll */
for (;;) {
@@ -171,7 +171,7 @@ static void WinNT_PollThread(void *vparam)
if (pPerfData)
mir_free(pPerfData);
if (fSwitched)
- WinNT_PerfStatsSwitch(_T("PerfOS"), TRUE);
+ WinNT_PerfStatsSwitch(L"PerfOS", TRUE);
/* return error for PollCpuUsage() if never succeeded */
if (param->hFirstEvent != NULL)