kernel32: Only try to load krnl386 in native applications.

This commit is contained in:
Alexandre Julliard 2014-06-18 18:35:19 +02:00
parent 699daa7749
commit b0953a09bd
1 changed files with 7 additions and 1 deletions

View File

@ -101,7 +101,13 @@ static BOOL process_attach( HMODULE module )
/* Securom checks for this one when version is NT */
set_entry_point( module, "FT_Thunk", 0 );
}
else LoadLibraryA( "krnl386.exe16" );
else
{
LDR_MODULE *ldr;
if (LdrFindEntryForAddress( GetModuleHandleW( 0 ), &ldr ) || !(ldr->Flags & LDR_WINE_INTERNAL))
LoadLibraryA( "krnl386.exe16" );
}
/* finish the process initialisation for console bits, if needed */
__wine_set_signal_handler(SIGINT, CONSOLE_HandleCtrlC);