+
+#define GDIOBJ_GetKernelObj(Handle) \
+
((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData
This function shouldn't even exist.
pdcattr->hlfntNew =
NtGdiGetStockObject(SYSTEM_FONT);
TextIntRealizeFont(pdcattr->hlfntNew,NULL);
+ NewDC->hlfntCur = pdcattr->hlfntNew;
+ NewDC->dclevel.plfnt = GDIOBJ_GetKernelObj(pdcattr->hlfntNew);
Looks like a good way to introduce bugs. There's a reason we have
locking functions. The fact that in this case it's a stockfont that
won't get deleted, doesn't mean we can do this always. If you want
performance, keep a global pointer to the font and use
GDIOBJ_IncrementShareCount