krnl386.exe: Preload gdi and user when thunks are being used.
This commit is contained in:
parent
a72eb123e5
commit
60f364068a
|
@ -782,12 +782,9 @@ static BOOL NE_LoadDLLs( NE_MODULE *pModule )
|
||||||
/* its handle in the list of DLLs to initialize. */
|
/* its handle in the list of DLLs to initialize. */
|
||||||
HMODULE16 hDLL;
|
HMODULE16 hDLL;
|
||||||
|
|
||||||
/* special magic for gdi and user */
|
|
||||||
if (!NE_strcasecmp( buffer, "user" )) strcpy( buffer, "USER.EXE" );
|
|
||||||
else if (!NE_strcasecmp( buffer, "gdi" )) strcpy( buffer, "GDI.EXE" );
|
|
||||||
/* Append .DLL to name if no extension present */
|
/* Append .DLL to name if no extension present */
|
||||||
else if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
|
if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
|
||||||
strcat( buffer, ".DLL" );
|
strcat( buffer, ".DLL" );
|
||||||
|
|
||||||
if ((hDLL = MODULE_LoadModule16( buffer, TRUE, TRUE )) < 32)
|
if ((hDLL = MODULE_LoadModule16( buffer, TRUE, TRUE )) < 32)
|
||||||
{
|
{
|
||||||
|
|
|
@ -272,6 +272,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
|
||||||
struct ThunkDataCommon *TD16;
|
struct ThunkDataCommon *TD16;
|
||||||
HMODULE16 hmod;
|
HMODULE16 hmod;
|
||||||
int ordinal;
|
int ordinal;
|
||||||
|
static int done;
|
||||||
|
|
||||||
|
if (!done)
|
||||||
|
{
|
||||||
|
LoadLibrary16( "gdi.exe" );
|
||||||
|
LoadLibrary16( "user.exe" );
|
||||||
|
done = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((hmod = LoadLibrary16(module)) <= 32)
|
if ((hmod = LoadLibrary16(module)) <= 32)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue