Commit da5623cb authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

taskmgr: Remove all TCHAR macro usage in debug handling code.

parent 10abc15f
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
void ProcessPage_OnDebug(void) void ProcessPage_OnDebug(void)
{ {
LVITEMW lvitem; LVITEMW lvitem;
ULONG Index; ULONG Index, Count;
DWORD dwProcessId; DWORD dwProcessId;
WCHAR wstrErrorText[256]; WCHAR wstrErrorText[256];
HKEY hKey; HKEY hKey;
...@@ -62,7 +62,8 @@ void ProcessPage_OnDebug(void) ...@@ -62,7 +62,8 @@ void ProcessPage_OnDebug(void)
LoadStringW(hInst, IDS_DEBUG_UNABLE2DEBUG, wszUnable2Debug, sizeof(wszUnable2Debug)/sizeof(WCHAR)); LoadStringW(hInst, IDS_DEBUG_UNABLE2DEBUG, wszUnable2Debug, sizeof(wszUnable2Debug)/sizeof(WCHAR));
LoadStringW(hInst, IDS_DEBUG_MESSAGE, wszWarnMsg, sizeof(wszWarnMsg)/sizeof(WCHAR)); LoadStringW(hInst, IDS_DEBUG_MESSAGE, wszWarnMsg, sizeof(wszWarnMsg)/sizeof(WCHAR));
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++) Count = SendMessageW(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0);
for (Index=0; Index<Count; Index++)
{ {
lvitem.mask = LVIF_STATE; lvitem.mask = LVIF_STATE;
lvitem.stateMask = LVIS_SELECTED; lvitem.stateMask = LVIS_SELECTED;
...@@ -75,9 +76,9 @@ void ProcessPage_OnDebug(void) ...@@ -75,9 +76,9 @@ void ProcessPage_OnDebug(void)
break; break;
} }
Count = SendMessageW(hProcessPageListCtrl, LVM_GETSELECTEDCOUNT, 0, 0);
dwProcessId = PerfDataGetProcessId(Index); dwProcessId = PerfDataGetProcessId(Index);
if ((Count != 1) || (dwProcessId == 0))
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return; return;
if (MessageBoxW(hMainWnd, wszWarnMsg, wszWarnTitle, MB_YESNO|MB_ICONWARNING) != IDYES) if (MessageBoxW(hMainWnd, wszWarnMsg, wszWarnTitle, MB_YESNO|MB_ICONWARNING) != IDYES)
...@@ -105,7 +106,7 @@ void ProcessPage_OnDebug(void) ...@@ -105,7 +106,7 @@ void ProcessPage_OnDebug(void)
RegCloseKey(hKey); RegCloseKey(hKey);
hDebugEvent = CreateEvent(NULL, FALSE, FALSE, NULL); hDebugEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
if (!hDebugEvent) if (!hDebugEvent)
{ {
GetLastErrorText(wstrErrorText, sizeof(wstrErrorText)/sizeof(WCHAR)); GetLastErrorText(wstrErrorText, sizeof(wstrErrorText)/sizeof(WCHAR));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment