2 * Emulator initialisation code
7 #include "wine/winbase16.h"
14 #include "debugtools.h"
16 /***********************************************************************
17 * Main loop of initial task
19 void wine_initial_task(void)
25 GetStartupInfoA( &info
);
26 if (!(info
.dwFlags
& STARTF_USESHOWWINDOW
)) info
.wShowWindow
= SW_SHOWNORMAL
;
28 if ((instance
= WinExec16( GetCommandLineA(), info
.wShowWindow
)) < 32)
30 MESSAGE( "%s: can't exec '%s': ", argv0
, GetCommandLineA() );
33 case 2: MESSAGE("file not found\n" ); break;
34 case 11: MESSAGE("invalid exe file\n" ); break;
35 default: MESSAGE("error=%d\n", instance
); break;
37 ExitProcess(instance
);
40 /* Start message loop for desktop window */
42 while ( GetNumTasks16() > 1 && Callout
.GetMessageA( &msg
, 0, 0, 0 ) )
44 Callout
.TranslateMessage( &msg
);
45 Callout
.DispatchMessageA( &msg
);
52 /**********************************************************************
55 int main( int argc
, char *argv
[] )
57 PROCESS_InitWine( argc
, argv
);
58 return 1; /* not reached */