krnl386.exe: Add an explicit name check to allow importing user.exe and gdi.exe even if not loaded already.

This commit is contained in:
Alexandre Julliard 2010-02-23 13:30:52 +01:00
parent 913cab1353
commit f3696e489b
1 changed files with 5 additions and 2 deletions

View File

@ -782,8 +782,11 @@ static BOOL NE_LoadDLLs( NE_MODULE *pModule )
/* its handle in the list of DLLs to initialize. */
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 */
if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
else if (!(p = strrchr( buffer, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
strcat( buffer, ".DLL" );
if ((hDLL = MODULE_LoadModule16( buffer, TRUE, TRUE )) < 32)