Michael Stefaniuc : taskmgr: There's no need to GetProcAddress() IsHungAppWindow().
Alexandre Julliard
julliard at winehq.org
Fri Oct 16 15:55:38 CDT 2020
Module: wine
Branch: master
Commit: 054be18f75c42d654464888747d377829da5c1c9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=054be18f75c42d654464888747d377829da5c1c9
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Thu Oct 15 23:09:39 2020 +0200
taskmgr: There's no need to GetProcAddress() IsHungAppWindow().
It's available since Win2K.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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;
}
More information about the wine-cvs
mailing list