2 * Main initialization code
13 #ifdef MALLOC_DEBUGGING
17 #include "wine/winbase16.h"
22 #include "debugtools.h"
23 #include "wine/server.h"
25 DEFAULT_DEBUG_CHANNEL(server
);
27 extern void SHELL_LoadRegistry(void);
29 /***********************************************************************
30 * Main initialisation routine
32 BOOL
MAIN_MainInit(void)
34 #ifdef MALLOC_DEBUGGING
38 if (!(trace
= getenv("MALLOC_TRACE")))
39 MESSAGE( "MALLOC_TRACE not set. No trace generated\n" );
42 MESSAGE( "malloc trace goes to %s\n", trace
);
48 setlocale(LC_CTYPE
,"");
50 /* Load the configuration file */
51 if (!PROFILE_LoadWineIni()) return FALSE
;
53 /* Initialise DOS drives */
54 if (!DRIVE_Init()) return FALSE
;
56 /* Initialise DOS directories */
57 if (!DIR_Init()) return FALSE
;
59 /* Registry initialisation */
62 /* Initialize module loadorder */
63 if (CLIENT_IsBootThread()) MODULE_InitLoadOrder();
65 /* Global boot finished, the rest is process-local */
66 CLIENT_BootDone( TRACE_ON(server
) );
72 /***********************************************************************
73 * ExitKernel (KERNEL.2)
75 * Clean-up everything and exit the Wine process.
78 void WINAPI
ExitKernel16( void )
80 /* Do the clean-up stuff */
83 TerminateProcess( GetCurrentProcess(), 0 );