gdi32: Load the 32-bit gdi.exe module wrapper from the 32-bit side.

Get rid of the empty gdi_main.c file.
This commit is contained in:
Alexandre Julliard 2009-12-28 16:27:26 +01:00
parent 9ceda48337
commit fadc2cda1c
5 changed files with 18 additions and 42 deletions

View File

@ -428,6 +428,17 @@ static void free_segptr_bits( HBITMAP16 bmp )
} }
} }
/**********************************************************************
* DllMain
*/
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
if (reason == DLL_PROCESS_ATTACH) LoadLibrary16( "gdi.exe" );
return TRUE;
}
/*********************************************************************** /***********************************************************************
* SetBkColor (GDI.1) * SetBkColor (GDI.1)
*/ */

View File

@ -27,7 +27,6 @@ C_SRCS = \
enhmfdrv/objects.c \ enhmfdrv/objects.c \
font.c \ font.c \
freetype.c \ freetype.c \
gdi_main.c \
gdiobj.c \ gdiobj.c \
icm.c \ icm.c \
mapping.c \ mapping.c \

View File

@ -1,38 +0,0 @@
/*
* GDI initialization code
*
* Copyright 2000 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winbase16.h"
#include "gdi_private.h"
/***********************************************************************
* GDI initialisation routine
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
{
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls(hinstDLL);
LoadLibrary16( "gdi.exe" );
return GDI_Init();
}

View File

@ -438,7 +438,6 @@ extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDE
extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN; extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
/* gdiobj.c */ /* gdiobj.c */
extern BOOL GDI_Init(void) DECLSPEC_HIDDEN;
extern HGDIOBJ alloc_gdi_handle( GDIOBJHDR *obj, WORD type, const struct gdi_obj_funcs *funcs ) DECLSPEC_HIDDEN; extern HGDIOBJ alloc_gdi_handle( GDIOBJHDR *obj, WORD type, const struct gdi_obj_funcs *funcs ) DECLSPEC_HIDDEN;
extern void *free_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN; extern void *free_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN;
extern void *GDI_GetObjPtr( HGDIOBJ, WORD ) DECLSPEC_HIDDEN; extern void *GDI_GetObjPtr( HGDIOBJ, WORD ) DECLSPEC_HIDDEN;

View File

@ -565,16 +565,21 @@ BOOL GDI_dec_ref_count( HGDIOBJ handle )
/*********************************************************************** /***********************************************************************
* GDI_Init * DllMain
* *
* GDI initialization. * GDI initialization.
*/ */
BOOL GDI_Init(void) BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{ {
LOGFONTW default_gui_font; LOGFONTW default_gui_font;
const struct DefaultFontInfo* deffonts; const struct DefaultFontInfo* deffonts;
int i; int i;
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls( inst );
LoadLibraryA( "gdi.exe16" );
WineEngInit(); WineEngInit();
/* create stock objects */ /* create stock objects */