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