2 * Main initialization code
14 #include "wine/winbase16.h"
21 #include "debugtools.h"
23 #include "loadorder.h"
25 DEFAULT_DEBUG_CHANNEL(server
);
27 /***********************************************************************
28 * Main initialisation routine
30 BOOL
MAIN_MainInit( char *argv
[] )
32 /* store the program name */
35 /* Create the initial process */
36 if (!PROCESS_Init()) return FALSE
;
38 /* Parse command line arguments */
39 OPTIONS_ParseOptions( argv
);
42 /* Load the configuration file */
43 if (!PROFILE_LoadWineIni()) return FALSE
;
45 /* Initialise DOS drives */
46 if (!DRIVE_Init()) return FALSE
;
48 /* Initialise DOS directories */
49 if (!DIR_Init()) return FALSE
;
51 /* Registry initialisation */
54 /* Global boot finished, the rest is process-local */
55 CLIENT_BootDone( TRACE_ON(server
) );
57 /* Initialize module loadorder */
58 if (!MODULE_InitLoadOrder()) return FALSE
;
60 /* Initialize relay code */
61 if (!RELAY_Init()) return FALSE
;
67 /***********************************************************************
68 * ExitKernel16 (KERNEL.2)
70 * Clean-up everything and exit the Wine process.
73 void WINAPI
ExitKernel16( void )
75 /* Do the clean-up stuff */
78 TerminateProcess( GetCurrentProcess(), 0 );