From 7b02da36f7648e6cf42ef32e7da689136de96e3d Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 22 Feb 2000 20:55:57 +0000 Subject: [PATCH] Added GdiDllInitialize() svn path=/trunk/; revision=1000 --- reactos/include/funcs.h | 8 +++++ reactos/lib/gdi32/gdi32.def | 4 ++- reactos/lib/gdi32/gdi32.edf | 4 ++- reactos/lib/gdi32/main/dllmain.c | 51 +++++++++++++++++++++++++++++-- reactos/lib/gdi32/misc/.cvsignore | 1 + 5 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 reactos/lib/gdi32/misc/.cvsignore diff --git a/reactos/include/funcs.h b/reactos/include/funcs.h index fffb6899932..b0ce120a61e 100644 --- a/reactos/include/funcs.h +++ b/reactos/include/funcs.h @@ -5658,6 +5658,14 @@ WINBOOL STDCALL FrameRgn(HDC, HRGN, HBRUSH, int, int); +WINBOOL +STDCALL +GdiDllInitialize (HANDLE, DWORD, LPVOID); + +VOID +STDCALL +GdiProcessSetup (VOID); + int STDCALL GetROP2(HDC); diff --git a/reactos/lib/gdi32/gdi32.def b/reactos/lib/gdi32/gdi32.def index 5f0489b8eef..f244276bf63 100644 --- a/reactos/lib/gdi32/gdi32.def +++ b/reactos/lib/gdi32/gdi32.def @@ -1,4 +1,4 @@ -; $Id: gdi32.def,v 1.4 1999/10/26 19:47:03 ea Exp $ +; $Id: gdi32.def,v 1.5 2000/02/22 20:55:23 ekohl Exp $ ; ; gdi32.def ; @@ -114,11 +114,13 @@ FlattenPath@4 FloodFill@16 FrameRgn@20 GdiComment@12 +GdiDllInitialize@12 GdiFlush@0 GdiGetBatchLimit@0 GdiPlayDCScript@24 GdiPlayJournal@20 GdiPlayScript@28 +GdiProcessSetup@0 GdiSetBatchLimit@4 GetArcDirection@4 GetAspectRatioFilterEx@8 diff --git a/reactos/lib/gdi32/gdi32.edf b/reactos/lib/gdi32/gdi32.edf index e7f8a73a006..606a382c7c5 100644 --- a/reactos/lib/gdi32/gdi32.edf +++ b/reactos/lib/gdi32/gdi32.edf @@ -1,4 +1,4 @@ -; $Id: gdi32.edf,v 1.2 1999/10/26 19:47:04 ea Exp $ +; $Id: gdi32.edf,v 1.3 2000/02/22 20:55:23 ekohl Exp $ ; ; gdi32.def ; @@ -114,11 +114,13 @@ FlattenPath=FlattenPath@4 FloodFill=FloodFill@16 FrameRgn=FrameRgn@20 GdiComment=GdiComment@12 +GdiDllInitialize=GdiDllInitialize@12 GdiFlush=GdiFlush@0 GdiGetBatchLimit=GdiGetBatchLimit@0 GdiPlayDCScript=GdiPlayDCScript@24 GdiPlayJournal=GdiPlayJournal@20 GdiPlayScript=GdiPlayScript@28 +GdiProcessSetup=GdiProcessSetup@0 GdiSetBatchLimit=GdiSetBatchLimit@4 GetArcDirection=GetArcDirection@4 GetAspectRatioFilterEx=GetAspectRatioFilterEx@8 diff --git a/reactos/lib/gdi32/main/dllmain.c b/reactos/lib/gdi32/main/dllmain.c index 929f7b3f299..9e730d8c5e8 100644 --- a/reactos/lib/gdi32/main/dllmain.c +++ b/reactos/lib/gdi32/main/dllmain.c @@ -1,14 +1,19 @@ /* * dllmain.c * - * $Revision: 1.2 $ - * $Author: ea $ - * $Date: 1999/05/23 07:41:33 $ + * $Revision: 1.3 $ + * $Author: ekohl $ + * $Date: 2000/02/22 20:55:36 $ * */ #include +#include +/* + * GDI32.DLL doesn't have an entry point. The initialization is done by a call + * to GdiDllInitialize(). This call is done from the entry point of USER32.DLL. + */ BOOL WINAPI DllMain ( @@ -20,4 +25,44 @@ DllMain ( return TRUE; } + +BOOL +WINAPI +GdiDllInitialize ( + HANDLE hDll, + DWORD dwReason, + LPVOID lpReserved + ) +{ + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + if (W32kInitialize () == FALSE) + return FALSE; + GdiProcessSetup (); + break; + + case DLL_THREAD_ATTACH: + break; + + default: + return FALSE; + } + +#if 0 + /* FIXME: working teb handling needed */ + NtCurrentTeb()->GdiTebBatch.Offset = 0; + NtCurrentTeb()->GdiBatchCount = 0; +#endif + + return TRUE; +} + +VOID +WINAPI +GdiProcessSetup (VOID) +{ + +} + /* EOF */ diff --git a/reactos/lib/gdi32/misc/.cvsignore b/reactos/lib/gdi32/misc/.cvsignore new file mode 100644 index 00000000000..63c24b8ba1d --- /dev/null +++ b/reactos/lib/gdi32/misc/.cvsignore @@ -0,0 +1 @@ +win32k.c \ No newline at end of file