Dmitry Timoshkov : version: Use GetModuleHandleEx to increment the module ref count.
Alexandre Julliard
julliard at winehq.org
Thu Nov 1 07:39:44 CDT 2007
Module: wine
Branch: master
Commit: 09c3d32ff583dad7b1ba8a86d17a65bc8226f705
URL: http://source.winehq.org/git/wine.git/?a=commit;h=09c3d32ff583dad7b1ba8a86d17a65bc8226f705
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Thu Nov 1 14:23:38 2007 +0800
version: Use GetModuleHandleEx to increment the module ref count.
---
dlls/version/info.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/version/info.c b/dlls/version/info.c
index 0ad288e..935d0c1 100644
--- a/dlls/version/info.c
+++ b/dlls/version/info.c
@@ -246,11 +246,9 @@ static DWORD VERSION_GetFileVersionInfo_PE( LPCWSTR filename, DWORD datasize, LP
TRACE("%s\n", debugstr_w(filename));
- hModule = GetModuleHandleW(filename);
- if(!hModule)
+ if (!GetModuleHandleExW(0, filename, &hModule))
hModule = LoadLibraryExW(filename, 0, LOAD_LIBRARY_AS_DATAFILE);
- else
- hModule = LoadLibraryExW(filename, 0, 0);
+
if(!hModule)
{
WARN("Could not load %s\n", debugstr_w(filename));
More information about the wine-cvs
mailing list