MSDN is not a good reference for this function. It's description is incomplete and wrong in some cases. And I don't see the problem. NtGdiExtGetObjectW is not called for GDI_OBJECT_TYPE_DC. It is only called for valid types.
James Tabor schrieb:
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 _______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev