2 static char RCSId[] = "$Id: wine.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
3 static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
26 /***********************************************************************
27 * Main initialisation routine
31 extern BOOL
RELAY_Init(void);
37 /* Initialize relay code */
38 if (!RELAY_Init()) return 0;
40 /* Initialize Win32 relay code */
41 if (!RELAY32_Init()) return 0;
43 /* Create built-in modules */
44 if (!MODULE_Init()) return 0;
46 /* Initialize tasks */
47 if (!TASK_Init()) return 0;
49 /* Initialize interrupt vectors */
50 if (!INT_Init()) return 0;
52 /* Initialize the DOS file system */
55 /* Create DOS environment */
58 /* Initialize signal handling */
61 /* Initialize communications */
65 /* Initialize the DOS memory */
68 /* Create USER heap */
69 if (!USER_HeapInit()) return 0;
72 /* Global atom table initialisation */
73 if (!ATOM_Init()) return 0;
75 /* GDI initialisation */
76 if (!GDI_Init()) return 0;
78 /* Initialize system colors and metrics*/
85 /* Initialize dialog manager */
86 if (!DIALOG_Init()) return 0;
88 /* Initialize menus */
89 if (!MENU_Init()) return 0;
91 /* Create system message queue */
92 queueSize
= GetProfileInt( "windows", "TypeAhead", 120 );
93 if (!MSG_CreateSysMsgQueue( queueSize
)) return 0;
100 /**********************************************************************
103 int _WinMain(int argc
, char **argv
)
107 if (!MAIN_Init()) return 0;
109 for (i
= 1; i
< argc
; i
++)
111 if (WinExec( argv
[i
], SW_SHOWNORMAL
) < 32)
113 fprintf(stderr
, "wine: can't exec '%s'.\n", argv
[i
]);
118 if (Options
.debug
) wine_debug(0, NULL
);
120 Yield(); /* Start the first task */
121 fprintf( stderr
, "WinMain: Should never happen: returned from Yield()\n" );
125 #endif /* #ifndef WINELIB */