953dc4762235d62fc068f17c38defbe93973b854
[reactos.git] / lib / gdi32 / main / dllmain.c
1 /*
2  * dllmain.c
3  *
4  * $Revision$
5  * $Author$
6  * $Date$
7  *
8  */
9
10 #include <windows.h>
11 #include <win32k/win32k.h>
12 #include <internal/heap.h>
13
14 /*
15  * GDI32.DLL doesn't have an entry point. The initialization is done by a call
16  * to GdiDllInitialize(). This call is done from the entry point of USER32.DLL.
17  */
18 BOOL
19 WINAPI
20 DllMain (
21         HANDLE  hDll,
22         DWORD   dwReason,
23         LPVOID  lpReserved
24         )
25 {
26         return TRUE;
27 }
28
29
30 /*
31  * @implemented
32  */
33 BOOL
34 WINAPI
35 GdiDllInitialize (
36         HANDLE  hDll,
37         DWORD   dwReason,
38         LPVOID  lpReserved
39         )
40 {
41         switch (dwReason)
42         {
43                 case DLL_PROCESS_ATTACH:
44                         GdiProcessSetup ();
45                         break;
46
47                 case DLL_THREAD_ATTACH:
48                         break;
49
50                 default:
51                         return FALSE;
52         }
53
54 #if 0
55         /* FIXME: working teb handling needed */
56         NtCurrentTeb()->GdiTebBatch.Offset = 0;
57         NtCurrentTeb()->GdiBatchCount = 0;
58 #endif
59
60         return TRUE;
61 }
62
63
64 VOID
65 WINAPI
66 GdiProcessSetup (VOID)
67 {
68         hProcessHeap = RtlGetProcessHeap();
69 }
70
71 /* EOF */