diff --git a/programs/taskmgr/debug.c b/programs/taskmgr/debug.c index cbd3ebf3a62..f6afd45484f 100644 --- a/programs/taskmgr/debug.c +++ b/programs/taskmgr/debug.c @@ -36,7 +36,7 @@ void ProcessPage_OnDebug(void) { LVITEMW lvitem; - ULONG Index; + ULONG Index, Count; DWORD dwProcessId; WCHAR wstrErrorText[256]; HKEY hKey; @@ -62,7 +62,8 @@ void ProcessPage_OnDebug(void) LoadStringW(hInst, IDS_DEBUG_UNABLE2DEBUG, wszUnable2Debug, sizeof(wszUnable2Debug)/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