mDC = NtGdiCreateMetafileDC( hDC ); // Basically changes the handle from 1xxxx to 46xxxx.
// If hDC == NULL, works just like createdc in win32k.
- if ( !GdiGetHandleUserData((HGDIOBJ) mDC, (PVOID) &Dc_Attr))
+ if ( !GdiGetHandleUserData((HGDIOBJ) mDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr))
{
SetLastError (ERROR_INVALID_PARAMETER);
return NULL; // need to delete the handle?
#if 0
PREGION_ATTR Rgn_Attr;
- if ((GdiGetHandleUserData((HGDIOBJ) hRgn, (PVOID) &Rgn_Attr)) &&
+ if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
( Rgn_Attr != NULL ))
{
PTEB pTeb = NtCurrentTeb();
#if 0
PREGION_ATTR Rgn_Attr;
- if (!(GdiGetHandleUserData((HGDIOBJ) hrgn, (PVOID) &Rgn_Attr)) ||
- (GDI_HANDLE_GET_TYPE(hrgn) != GDI_OBJECT_TYPE_REGION))
+ if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
#endif
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
#if 0