From 128843046dc60e35b1f4842abf17fd74cb35bc00 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Mon, 31 Jul 2000 21:01:46 +0000 Subject: [PATCH] DOS binary support has been restored. --- scheduler/process.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scheduler/process.c b/scheduler/process.c index 656e81d88b1..9745981f09a 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -18,6 +18,7 @@ #include "main.h" #include "module.h" #include "neexe.h" +#include "dosexe.h" #include "file.h" #include "global.h" #include "heap.h" @@ -501,8 +502,14 @@ void PROCESS_InitWine( int argc, char *argv[] ) break; case SCS_DOS_BINARY: - FIXME( "DOS binaries support is broken at the moment; feel free to fix it...\n" ); - SetLastError( ERROR_BAD_FORMAT ); + { + HMODULE main_module; + /* create 32-bit module for main exe */ + if (!(main_module = BUILTIN32_LoadExeModule())) goto error; + NtCurrentTeb()->tibflags &= ~TEBF_WIN32; + if (!MZ_LoadImage( main_module, main_exe_file, main_exe_name )) goto error; + PROCESS_Start( main_module, NULL ); + } break; case SCS_PIF_BINARY: -- 2.11.4.GIT