From 054be18f75c42d654464888747d377829da5c1c9 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 15 Oct 2020 23:09:39 +0200 Subject: [PATCH] taskmgr: There's no need to GetProcAddress() IsHungAppWindow(). It's available since Win2K. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- programs/taskmgr/applpage.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/programs/taskmgr/applpage.c b/programs/taskmgr/applpage.c index 5a005290be4..6b2e04077c2 100644 --- a/programs/taskmgr/applpage.c +++ b/programs/taskmgr/applpage.c @@ -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; }