Cleaned up local heap initialisation.
[wine/wine-kai.git] / dlls / gdi / gdi_main.c
blobaf40d4cee636cb1a18ce920a9c42105ad603c732
1 /*
2 * GDI initialization code
3 */
5 #include "windef.h"
6 #include "wingdi.h"
7 #include "wine/winbase16.h"
9 #include "gdi.h"
10 #include "global.h"
11 #include "psdrv.h"
12 #include "tweak.h"
13 #include "win16drv.h"
16 /***********************************************************************
17 * GDI initialisation routine
19 BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
21 HINSTANCE16 instance;
23 if ( GDI_HeapSel ) return TRUE;
25 /* Create GDI heap */
26 if ((instance = LoadLibrary16( "GDI.EXE" )) < 32) return FALSE;
27 GDI_HeapSel = GlobalHandleToSel16( instance );
29 if (!TWEAK_Init()) return FALSE;
31 /* GDI initialisation */
32 if(!GDI_Init()) return FALSE;
34 /* Create the Win16 printer driver */
35 if (!WIN16DRV_Init()) return FALSE;
37 /* PSDRV initialization */
38 if(!PSDRV_Init()) return FALSE;
40 return TRUE;