taskmgr: There's no need to GetProcAddress() IsHungAppWindow().
It's available since Win2K. Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
de679af492
commit
054be18f75
|
@ -238,10 +238,6 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
|
|||
HICON hIcon;
|
||||
WCHAR wszText[256];
|
||||
BOOL bLargeIcon = TaskManagerSettings.View_LargeIcons;
|
||||
BOOL bHung = FALSE;
|
||||
typedef int (__stdcall *IsHungAppWindowProc)(HWND);
|
||||
IsHungAppWindowProc IsHungAppWindow;
|
||||
|
||||
|
||||
/* Skip our window */
|
||||
if (hWnd == hMainWnd)
|
||||
|
@ -270,14 +266,7 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
|
|||
if (!hIcon)
|
||||
hIcon = LoadIconW(hInst, bLargeIcon ? MAKEINTRESOURCEW(IDI_WINDOW) : MAKEINTRESOURCEW(IDI_WINDOWSM));
|
||||
|
||||
bHung = FALSE;
|
||||
|
||||
IsHungAppWindow = (IsHungAppWindowProc)(FARPROC)GetProcAddress(GetModuleHandleW(wszUser32), "IsHungAppWindow");
|
||||
|
||||
if (IsHungAppWindow)
|
||||
bHung = IsHungAppWindow(hWnd);
|
||||
|
||||
AddOrUpdateHwnd(hWnd, wszText, hIcon, bHung);
|
||||
AddOrUpdateHwnd(hWnd, wszText, hIcon, IsHungAppWindow(hWnd));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue