Commit 12de7d75 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 8fe38e80
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment