Commit a3e80956 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Handle the case where the 16-bit module is already loaded also for separated dlls.

parent 1cee3235
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment