Hi!
switch(dwType)
{
+ case GDI_OBJECT_TYPE_PEN: //Check the structures and see if A & W are the same.
+ case GDI_OBJECT_TYPE_EXTPEN:
+ case GDI_OBJECT_TYPE_BRUSH: // Mixing Apples and Oranges?
+ case GDI_OBJECT_TYPE_BITMAP:
+ case GDI_OBJECT_TYPE_PALETTE:
+ return NtGdiExtGetObjectW(hGdiObj, cbSize, lpBuffer);
+
case GDI_OBJECT_TYPE_DC:
case GDI_OBJECT_TYPE_REGION:
case GDI_OBJECT_TYPE_METAFILE:
case GDI_OBJECT_TYPE_ENHMETAFILE:
case GDI_OBJECT_TYPE_EMF:
- case GDI_OBJECT_TYPE_METADC:
SetLastError(ERROR_INVALID_HANDLE);
- return 0;
This is wrong,,, you can not call NtGdiExtGetObjectW first before faulting on
GDI_OBJECT_TYPE_DC.
http://msdn2.microsoft.com/en-us/library/ms533268.aspx
Normal DC's do not pass to kernel space. Please RTFM.
Thanks,
James