Michael Stefaniuc : taskmgr: Shell32 is imported, no need to load it again.
Alexandre Julliard
julliard at winehq.org
Mon Oct 19 15:54:05 CDT 2020
Module: wine
Branch: master
Commit: 9764b6fe37d04177f9c5cb9da2601ba97ba9b5e0
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9764b6fe37d04177f9c5cb9da2601ba97ba9b5e0
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Sun Oct 18 23:33:29 2020 +0200
taskmgr: Shell32 is imported, no need to load it again.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/taskmgr/run.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/programs/taskmgr/run.c b/programs/taskmgr/run.c
index 6d24f1c745c..177c737bb07 100644
--- a/programs/taskmgr/run.c
+++ b/programs/taskmgr/run.c
@@ -48,13 +48,10 @@ UINT uFlags);
void TaskManager_OnFileNew(void)
{
- HMODULE hShell32;
RUNFILEDLG RunFileDlg;
OSVERSIONINFOW versionInfo;
- static const WCHAR wszShell32[] = {'S','H','E','L','L','3','2','.','D','L','L',0};
- hShell32 = LoadLibraryW(wszShell32);
- RunFileDlg = (void *)GetProcAddress(hShell32, (LPCSTR)61);
+ RunFileDlg = (void *)GetProcAddress(GetModuleHandleW(L"shell32.dll"), (LPCSTR)61);
/* Show "Run..." dialog */
if (RunFileDlg)
@@ -76,6 +73,4 @@ void TaskManager_OnFileNew(void)
RunFileDlg(hMainWnd, hIcon, NULL, szTitle, NULL, RFF_CALCDIRECTORY);
}
}
-
- FreeLibrary(hShell32);
}
More information about the wine-cvs
mailing list