From 00ac7074df65a0abd7e0ee962c570e2da30349e4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 1 Mar 2010 11:34:34 +0100 Subject: [PATCH] kernel32: Move shared heap creation to krnl386 and load it by default on Win9x versions. --- dlls/kernel32/kernel_main.c | 8 +------- dlls/krnl386.exe16/kernel.c | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c index cf7305257bd..2308d60fe2a 100644 --- a/dlls/kernel32/kernel_main.c +++ b/dlls/kernel32/kernel_main.c @@ -123,13 +123,7 @@ static BOOL process_attach( HMODULE module ) /* Securom checks for this one when version is NT */ set_entry_point( module, "FT_Thunk", 0 ); } -#ifdef __i386__ - else - { - /* create the shared heap for broken win95 native dlls */ - HeapCreate( HEAP_SHARED, 0, 0 ); - } -#endif + else LoadLibraryA( "krnl386.exe16" ); /* finish the process initialisation for console bits, if needed */ __wine_set_signal_handler(SIGINT, CONSOLE_HandleCtrlC); diff --git a/dlls/krnl386.exe16/kernel.c b/dlls/krnl386.exe16/kernel.c index b6fbbcbc5a9..7658549526b 100644 --- a/dlls/krnl386.exe16/kernel.c +++ b/dlls/krnl386.exe16/kernel.c @@ -95,6 +95,9 @@ BOOL WINAPI KERNEL_DllEntryPoint( DWORD reasion, HINSTANCE16 inst, WORD ds, if (done) return TRUE; done = 1; + /* create the shared heap for broken win95 native dlls */ + HeapCreate( HEAP_SHARED, 0, 0 ); + /* setup emulation of protected instructions from 32-bit code */ if (GetVersion() & 0x80000000) RtlAddVectoredExceptionHandler( TRUE, INSTR_vectored_handler );