diff --git a/programs/taskmgr/endproc.c b/programs/taskmgr/endproc.c index 10a8cd4cd66..0095f459a98 100644 --- a/programs/taskmgr/endproc.c +++ b/programs/taskmgr/endproc.c @@ -47,14 +47,15 @@ static void load_message_strings(void) void ProcessPage_OnEndProcess(void) { LVITEMW lvitem; - ULONG Index; + ULONG Index, Count; DWORD dwProcessId; HANDLE hProcess; WCHAR wstrErrorText[256]; load_message_strings(); - for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++) + Count = SendMessageW(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0); + for (Index=0; Index