kernel32: Handle the case where the 16-bit module is already loaded also for separated dlls.
This commit is contained in:
parent
1cee3235bc
commit
a3e80956d1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue