version: Use GetModuleHandleEx to increment the module ref count.
This commit is contained in:
parent
7bb12b9e8c
commit
09c3d32ff5
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue