Bug fixes.

This commit is contained in:
Alexandre Julliard 1999-05-03 08:58:25 +00:00
parent 64ae5a57cf
commit 481a8e263c
2 changed files with 5 additions and 1 deletions

View file

@ -864,6 +864,10 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
pdb = PROCESS_IdToPDB( info.dwProcessId );
tdb = pdb? (TDB *)GlobalLock16( pdb->task ) : NULL;
hInstance = tdb && tdb->hInstance? tdb->hInstance : pdb? pdb->task : 0;
/* If there is no hInstance (32-bit process) return a dummy value
* that must be > 31
* FIXME: should do this in all cases and fix Win16 callers */
if (!hInstance) hInstance = 33;
/* Close off the handles */
CloseHandle( info.hThread );

View file

@ -411,7 +411,7 @@ BOOL TASK_Create( THDB *thdb, NE_MODULE *pModule, HINSTANCE16 hInstance,
pTask->thdb->teb.htask16 = pTask->thdb->process->task = hTask;
TRACE_(task)("module='%s' cmdline='%s' task=%04x\n", name, cmd_line, hTask );
if (pTask->flags & TDBF_WIN32) return;
if (pTask->flags & TDBF_WIN32) return TRUE;
/* If we have a DGROUP/hInstance, use it for 16-bit stack */