Yet another attempt at fixing CW_USEDEFAULT handling.
[wine.git] / dlls / gdi / gdi_main.c
blob1295124b55ceb537fbbe9cf0413b206207b2be23
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 "tweak.h"
12 #include "win16drv.h"
13 #include "winbase.h"
15 /***********************************************************************
16 * GDI initialisation routine
18 BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
20 HINSTANCE16 instance;
22 if ( GDI_HeapSel ) return TRUE;
24 /* Create GDI heap */
25 if ((instance = LoadLibrary16( "GDI.EXE" )) < 32) return FALSE;
26 GDI_HeapSel = GlobalHandleToSel16( instance );
28 if (!TWEAK_Init()) return FALSE;
30 /* GDI initialisation */
31 if(!GDI_Init()) return FALSE;
33 /* Create the Win16 printer driver */
34 if (!WIN16DRV_Init()) return FALSE;
36 /* PSDRV initialization */
37 if (!LoadLibraryA( "wineps" )) return FALSE;
39 return TRUE;