Author: jimtabor
Date: Thu Nov 29 16:07:38 2007
New Revision: 30897
URL:
http://svn.reactos.org/svn/reactos?rev=30897&view=rev
Log:
Add Region object types and one Dc that was missed. Thanks Thomas!
Modified:
trunk/reactos/dll/win32/gdi32/objects/enhmfile.c
trunk/reactos/dll/win32/gdi32/objects/region.c
Modified: trunk/reactos/dll/win32/gdi32/objects/enhmfile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/en…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/enhmfile.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/enhmfile.c Thu Nov 29 16:07:38 2007
@@ -31,7 +31,7 @@
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?
Modified: trunk/reactos/dll/win32/gdi32/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/re…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/region.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/region.c Thu Nov 29 16:07:38 2007
@@ -87,7 +87,7 @@
#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();
@@ -151,8 +151,7 @@
#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