12 extern HGDIOBJ stock_objects
[];
13 BOOL SetStockObjects
= FALSE
;
14 PDEVCAPS GdiDevCaps
= NULL
;
15 PGDIHANDLECACHE GdiHandleCache
= NULL
;
17 RTL_CRITICAL_SECTION semLocal
;
20 * GDI32.DLL does have an entry point for disable threadlibrarycall,. The initialization is done by a call
21 * to GdiDllInitialize(). This call is done from the entry point of USER32.DLL.
32 case DLL_PROCESS_ATTACH
:
33 DisableThreadLibraryCalls(hDll
);
45 GdiProcessSetup (VOID
)
47 hProcessHeap
= GetProcessHeap();
49 /* map the gdi handle table to user space */
50 GdiHandleTable
= NtCurrentTeb()->ProcessEnvironmentBlock
->GdiSharedHandleTable
;
51 GdiSharedHandleTable
= NtCurrentTeb()->ProcessEnvironmentBlock
->GdiSharedHandleTable
;
52 GdiDevCaps
= &GdiSharedHandleTable
->DevCaps
;
53 CurrentProcessId
= NtCurrentTeb()->ClientId
.UniqueProcess
;
54 GDI_BatchLimit
= (DWORD
) NtCurrentTeb()->ProcessEnvironmentBlock
->GdiDCAttributeList
;
55 GdiHandleCache
= (PGDIHANDLECACHE
)NtCurrentTeb()->ProcessEnvironmentBlock
->GdiHandleBuffer
;
56 RtlInitializeCriticalSection(&semLocal
);
72 case DLL_PROCESS_ATTACH
:
76 case DLL_THREAD_ATTACH
:
77 NtCurrentTeb()->GdiTebBatch
.Offset
= 0;
78 NtCurrentTeb()->GdiBatchCount
= 0;
85 // Very simple, the list will fill itself as it is needed.
88 RtlZeroMemory( &stock_objects
, NB_STOCK_OBJECTS
); //Assume Ros is dirty.
89 SetStockObjects
= TRUE
;