LoadModule32/WinExec32 should return 16-bit hInstance/hTask.
This commit is contained in:
parent
e82199121f
commit
2aad33e032
|
@ -525,15 +525,10 @@ HINSTANCE32 WINAPI LoadModule32( LPCSTR name, LPVOID paramBlock )
|
||||||
NULL, &startup, &info ))
|
NULL, &startup, &info ))
|
||||||
return GetLastError(); /* guaranteed to be < 32 */
|
return GetLastError(); /* guaranteed to be < 32 */
|
||||||
|
|
||||||
/* Get hInstance from process */
|
/* Get 16-bit hInstance/hTask from process */
|
||||||
pdb = PROCESS_IdToPDB( info.dwProcessId );
|
pdb = PROCESS_IdToPDB( info.dwProcessId );
|
||||||
if ( pdb->exe_modref )
|
tdb = pdb? (TDB *)GlobalLock16( pdb->task ) : NULL;
|
||||||
hInstance = pdb->exe_modref->module;
|
hInstance = tdb && tdb->hInstance? tdb->hInstance : pdb? pdb->task : 0;
|
||||||
else
|
|
||||||
{
|
|
||||||
tdb = pdb? (TDB *)GlobalLock16( pdb->task ) : NULL;
|
|
||||||
hInstance = tdb? tdb->hInstance : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Close off the handles */
|
/* Close off the handles */
|
||||||
CloseHandle( info.hThread );
|
CloseHandle( info.hThread );
|
||||||
|
|
Loading…
Reference in New Issue