mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-30 21:57:28 +00:00
Force loadorder of 16-bit dlls to builtin if their 32-bit counterpart
has already been loaded as builtin.
This commit is contained in:
parent
40043ed26f
commit
0eec45a97b
|
@ -154,6 +154,25 @@ static const BUILTIN16_DESCRIPTOR *find_dll_descr( const char *dllname )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* BUILTIN_IsPresent
|
||||||
|
*
|
||||||
|
* Check if a builtin dll descriptor is present (because we loaded its 32-bit counterpart).
|
||||||
|
*/
|
||||||
|
BOOL BUILTIN_IsPresent( LPCSTR name )
|
||||||
|
{
|
||||||
|
char dllname[20], *p;
|
||||||
|
|
||||||
|
if (strlen(name) >= sizeof(dllname)-4) return FALSE;
|
||||||
|
strcpy( dllname, name );
|
||||||
|
p = strrchr( dllname, '.' );
|
||||||
|
if (!p) strcat( dllname, ".dll" );
|
||||||
|
for (p = dllname; *p; p++) *p = FILE_tolower(*p);
|
||||||
|
|
||||||
|
return (find_dll_descr( dllname ) != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* BUILTIN_LoadModule
|
* BUILTIN_LoadModule
|
||||||
*
|
*
|
||||||
|
|
|
@ -88,8 +88,6 @@ enum arg_types
|
||||||
#define ARG_RET16 0x80000000 /* function returns 16-bit value */
|
#define ARG_RET16 0x80000000 /* function returns 16-bit value */
|
||||||
#define ARG_REGISTER 0x40000000 /* function is register */
|
#define ARG_REGISTER 0x40000000 /* function is register */
|
||||||
|
|
||||||
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name );
|
|
||||||
|
|
||||||
extern WORD __wine_call_from_16_word();
|
extern WORD __wine_call_from_16_word();
|
||||||
extern LONG __wine_call_from_16_long();
|
extern LONG __wine_call_from_16_long();
|
||||||
extern void __wine_call_from_16_regs();
|
extern void __wine_call_from_16_regs();
|
||||||
|
|
|
@ -272,6 +272,10 @@ extern HMODULE BUILTIN32_LoadExeModule( HMODULE main );
|
||||||
extern void *BUILTIN32_dlopen( const char *name );
|
extern void *BUILTIN32_dlopen( const char *name );
|
||||||
extern int BUILTIN32_dlclose( void *handle );
|
extern int BUILTIN32_dlclose( void *handle );
|
||||||
|
|
||||||
|
/* if1632/builtin.c */
|
||||||
|
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name );
|
||||||
|
extern BOOL BUILTIN_IsPresent( LPCSTR name );
|
||||||
|
|
||||||
/* USER signal proc flags and codes */
|
/* USER signal proc flags and codes */
|
||||||
/* See PROCESS_CallUserSignalProc for comments */
|
/* See PROCESS_CallUserSignalProc for comments */
|
||||||
#define USIG_FLAGS_WIN32 0x0001
|
#define USIG_FLAGS_WIN32 0x0001
|
||||||
|
|
|
@ -494,7 +494,18 @@ void MODULE_GetLoadOrder( enum loadorder_type loadorder[], const char *path, BOO
|
||||||
|
|
||||||
/* Strip path information for 16 bit modules or if the module
|
/* Strip path information for 16 bit modules or if the module
|
||||||
* resides in the system directory */
|
* resides in the system directory */
|
||||||
if (!win32) path = get_basename( path );
|
if (!win32)
|
||||||
|
{
|
||||||
|
path = get_basename( path );
|
||||||
|
if (BUILTIN_IsPresent(path))
|
||||||
|
{
|
||||||
|
TRACE( "forcing loadorder to builtin for %s\n", debugstr_a(path) );
|
||||||
|
/* force builtin loadorder since the dll is already in memory */
|
||||||
|
loadorder[0] = LOADORDER_BI;
|
||||||
|
loadorder[1] = LOADORDER_INVALID;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char sysdir[MAX_PATH+1];
|
char sysdir[MAX_PATH+1];
|
||||||
|
|
Loading…
Reference in a new issue