2 * GDI initialization code
7 #include "wine/winbase16.h"
17 /***********************************************************************
18 * GDI initialisation routine
20 BOOL WINAPI
MAIN_GdiInit(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
24 if ( GDI_HeapSel
) return TRUE
;
27 pModule
= NE_GetPtr( GetModuleHandle16( "GDI" ) );
30 GDI_HeapSel
= GlobalHandleToSel16( (NE_SEG_TABLE( pModule
) +
31 pModule
->dgroup
- 1)->hSeg
);
35 GDI_HeapSel
= GlobalAlloc16( GMEM_FIXED
, GDI_HEAP_SIZE
);
36 LocalInit16( GDI_HeapSel
, 0, GDI_HEAP_SIZE
-1 );
39 if (!TWEAK_Init()) return FALSE
;
41 /* GDI initialisation */
42 if(!GDI_Init()) return FALSE
;
44 /* Create the Win16 printer driver */
45 if (!WIN16DRV_Init()) return FALSE
;
47 /* PSDRV initialization */
48 if(!PSDRV_Init()) return FALSE
;