7 extern HGDIOBJ stock_objects
[];
8 BOOL SetStockObjects
= FALSE
;
9 PDEVCAPS GdiDevCaps
= NULL
;
10 PGDIHANDLECACHE GdiHandleCache
= NULL
;
12 RTL_CRITICAL_SECTION semLocal
;
13 extern CRITICAL_SECTION gcsClientObjLinks
;
16 * GDI32.DLL does have an entry point for disable threadlibrarycall,. The initialization is done by a call
17 * to GdiDllInitialize(). This call is done from the entry point of USER32.DLL.
28 case DLL_PROCESS_ATTACH
:
29 DisableThreadLibraryCalls(hDll
);
41 GdiProcessSetup (VOID
)
43 hProcessHeap
= GetProcessHeap();
45 /* map the gdi handle table to user space */
46 GdiHandleTable
= NtCurrentTeb()->ProcessEnvironmentBlock
->GdiSharedHandleTable
;
47 GdiSharedHandleTable
= NtCurrentTeb()->ProcessEnvironmentBlock
->GdiSharedHandleTable
;
48 GdiDevCaps
= &GdiSharedHandleTable
->DevCaps
;
49 CurrentProcessId
= NtCurrentTeb()->ClientId
.UniqueProcess
;
50 GDI_BatchLimit
= (DWORD
) NtCurrentTeb()->ProcessEnvironmentBlock
->GdiDCAttributeList
;
51 GdiHandleCache
= (PGDIHANDLECACHE
)NtCurrentTeb()->ProcessEnvironmentBlock
->GdiHandleBuffer
;
52 RtlInitializeCriticalSection(&semLocal
);
53 InitializeCriticalSection(&gcsClientObjLinks
);
69 case DLL_PROCESS_ATTACH
:
73 case DLL_THREAD_ATTACH
:
74 NtCurrentTeb()->GdiTebBatch
.Offset
= 0;
75 NtCurrentTeb()->GdiBatchCount
= 0;
82 // Very simple, the list will fill itself as it is needed.
85 RtlZeroMemory( &stock_objects
, NB_STOCK_OBJECTS
); //Assume Ros is dirty.
86 SetStockObjects
= TRUE
;