2000-03-19 12:08:09 +00:00
|
|
|
/*
|
|
|
|
* GDI initialization code
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "wine/winbase16.h"
|
|
|
|
|
|
|
|
#include "gdi.h"
|
|
|
|
#include "global.h"
|
|
|
|
#include "tweak.h"
|
|
|
|
#include "win16drv.h"
|
2000-05-30 22:47:02 +00:00
|
|
|
#include "winbase.h"
|
2000-03-19 12:08:09 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GDI initialisation routine
|
|
|
|
*/
|
|
|
|
BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
2000-05-07 18:41:15 +00:00
|
|
|
HINSTANCE16 instance;
|
2000-03-19 12:08:09 +00:00
|
|
|
|
|
|
|
if ( GDI_HeapSel ) return TRUE;
|
|
|
|
|
|
|
|
/* Create GDI heap */
|
2000-05-07 18:41:15 +00:00
|
|
|
if ((instance = LoadLibrary16( "GDI.EXE" )) < 32) return FALSE;
|
|
|
|
GDI_HeapSel = GlobalHandleToSel16( instance );
|
2000-03-19 12:08:09 +00:00
|
|
|
|
|
|
|
if (!TWEAK_Init()) return FALSE;
|
|
|
|
|
|
|
|
/* GDI initialisation */
|
|
|
|
if(!GDI_Init()) return FALSE;
|
|
|
|
|
|
|
|
/* Create the Win16 printer driver */
|
|
|
|
if (!WIN16DRV_Init()) return FALSE;
|
|
|
|
|
|
|
|
/* PSDRV initialization */
|
2000-05-30 20:27:23 +00:00
|
|
|
if (!LoadLibraryA( "wineps" )) return FALSE;
|
2000-03-19 12:08:09 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|