Module: wine Branch: master Commit: a3e80956d1f7127341ff420e51afafef02493065 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3e80956d1f7127341ff420e51...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 28 16:19:04 2009 +0100
kernel32: Handle the case where the 16-bit module is already loaded also for separated dlls.
---
dlls/kernel32/ne_module.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/kernel32/ne_module.c b/dlls/kernel32/ne_module.c index 8f22ccb..273eb9e 100644 --- a/dlls/kernel32/ne_module.c +++ b/dlls/kernel32/ne_module.c @@ -1119,16 +1119,6 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ FreeLibrary( mod32 ); owner_exists = 0; } - /* loading the 32-bit library can have the side effect of loading the module */ - /* if so, simply incr the ref count and return the module */ - if ((hModule = GetModuleHandle16( libname ))) - { - TRACE( "module %s already loaded by owner\n", libname ); - pModule = NE_GetPtr( hModule ); - if (pModule) pModule->count++; - FreeLibrary( mod32 ); - return hModule; - } } else { @@ -1137,6 +1127,16 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_ return ERROR_FILE_NOT_FOUND; } } + /* loading the 32-bit library can have the side effect of loading the module */ + /* if so, simply incr the ref count and return the module */ + if (descr && (hModule = GetModuleHandle16( libname ))) + { + TRACE( "module %s already loaded by owner\n", libname ); + pModule = NE_GetPtr( hModule ); + if (pModule) pModule->count++; + FreeLibrary( mod32 ); + return hModule; + } }
if (descr)