2 * Main initialization code
4 * Copyright 1998 Ulrich Weigand
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <sys/types.h>
29 #ifdef MALLOC_DEBUGGING
33 #include "wine/winbase16.h"
37 #include "wine/debug.h"
38 #include "wine/server.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(server
);
42 extern void SHELL_LoadRegistry(void);
44 /***********************************************************************
45 * Main initialisation routine
47 BOOL
MAIN_MainInit(void)
49 #ifdef MALLOC_DEBUGGING
53 if (!(trace
= getenv("MALLOC_TRACE")))
54 MESSAGE( "MALLOC_TRACE not set. No trace generated\n" );
57 MESSAGE( "malloc trace goes to %s\n", trace
);
63 setlocale(LC_CTYPE
,"");
65 /* Load the configuration file */
66 if (!PROFILE_LoadWineIni()) return FALSE
;
68 /* Initialise DOS drives */
69 if (!DRIVE_Init()) return FALSE
;
71 /* Initialise DOS directories */
72 if (!DIR_Init()) return FALSE
;
74 /* Registry initialisation */
77 /* Global boot finished, the rest is process-local */
78 CLIENT_BootDone( TRACE_ON(server
) );
84 /***********************************************************************
85 * ExitKernel (KERNEL.2)
87 * Clean-up everything and exit the Wine process.
90 void WINAPI
ExitKernel16( void )
92 /* Do the clean-up stuff */
95 TerminateProcess( GetCurrentProcess(), 0 );