Alexandre Julliard : kernel32: Only try to load krnl386 in native applications.
Alexandre Julliard
julliard at winehq.org
Wed Jun 18 14:31:41 CDT 2014
Module: wine
Branch: master
Commit: b0953a09bdc8d807b6549051c4283a6e2dc6ad88
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0953a09bdc8d807b6549051c4283a6e2dc6ad88
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 18 18:35:19 2014 +0200
kernel32: Only try to load krnl386 in native applications.
---
dlls/kernel32/kernel_main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index 13c01ed..6afc1cb 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -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);
More information about the wine-cvs
mailing list