kernel32: Move the wineboot event wait so that 16-bit processes wait too.

This commit is contained in:
Alexandre Julliard 2008-05-13 20:26:37 +02:00
parent 8fe38e8043
commit 12de7d7591

View file

@ -1022,6 +1022,18 @@ void __wine_kernel_init(void)
RtlInitUnicodeString( &NtCurrentTeb()->Peb->ProcessParameters->DllPath,
MODULE_get_dll_load_path(main_exe_name) );
if (boot_event)
{
if (WaitForSingleObject( boot_event, 30000 )) WARN( "boot event wait timed out\n" );
CloseHandle( boot_event );
/* if we didn't find environment section, try again now that wineboot has run */
if (!got_environment)
{
set_registry_environment();
set_additional_environment();
}
}
if (!(peb->ImageBaseAddress = LoadLibraryExW( main_exe_name, 0, DONT_RESOLVE_DLL_REFERENCES )))
{
char msg[1024];
@ -1041,18 +1053,6 @@ void __wine_kernel_init(void)
ExitProcess( error );
}
if (boot_event)
{
if (WaitForSingleObject( boot_event, 30000 )) WARN( "boot event wait timed out\n" );
CloseHandle( boot_event );
/* if we didn't find environment section, try again now that wineboot has run */
if (!got_environment)
{
set_registry_environment();
set_additional_environment();
}
}
LdrInitializeThunk( 0, 0, 0, 0 );
/* switch to the new stack */
wine_switch_to_stack( start_process, NULL, NtCurrentTeb()->Tib.StackBase );