Added missing const to external tables definitions.
[wine/hacks.git] / loader / main.c
blob4e60ebbcc0052fdef8a99e07a0e63caee2b4b0bb
1 /*
2 * Main initialization code
3 */
5 #include <stdlib.h>
6 #include <sys/types.h>
7 #include <sys/stat.h>
8 #include <fcntl.h>
9 #include <unistd.h>
10 #include <string.h>
11 #include "windef.h"
12 #include "wine/winbase16.h"
13 #include "main.h"
14 #include "drive.h"
15 #include "file.h"
16 #include "options.h"
17 #include "shell.h"
18 #include "debugtools.h"
19 #include "server.h"
20 #include "loadorder.h"
22 DEFAULT_DEBUG_CHANNEL(server);
24 /***********************************************************************
25 * Main initialisation routine
27 BOOL MAIN_MainInit(void)
29 MAIN_WineInit();
31 /* Load the configuration file */
32 if (!PROFILE_LoadWineIni()) return FALSE;
34 /* Initialise DOS drives */
35 if (!DRIVE_Init()) return FALSE;
37 /* Initialise DOS directories */
38 if (!DIR_Init()) return FALSE;
40 /* Registry initialisation */
41 SHELL_LoadRegistry();
43 /* Global boot finished, the rest is process-local */
44 CLIENT_BootDone( TRACE_ON(server) );
46 /* Initialize module loadorder */
47 if (!MODULE_InitLoadOrder()) return FALSE;
49 /* Initialize relay code */
50 if (!RELAY_Init()) return FALSE;
52 return TRUE;
56 /***********************************************************************
57 * ExitKernel16 (KERNEL.2)
59 * Clean-up everything and exit the Wine process.
62 void WINAPI ExitKernel16( void )
64 /* Do the clean-up stuff */
66 WriteOutProfiles16();
67 TerminateProcess( GetCurrentProcess(), 0 );