Author: jimtabor
Date: Mon Apr 21 13:28:35 2008
New Revision: 33090
URL:
http://svn.reactos.org/svn/reactos?rev=33090&view=rev
Log:
Attempt to fix problem where there should have not been a problem. Remember this, do not
fix it when it is not broken. I will restore GdiFixUpHandle back to the original state
later.
Modified:
trunk/reactos/dll/win32/gdi32/misc/misc.c
Modified: trunk/reactos/dll/win32/gdi32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/misc.…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/misc/misc.c [iso-8859-1] Mon Apr 21 13:28:35 2008
@@ -104,8 +104,11 @@
BOOL GdiIsHandleValid(HGDIOBJ hGdiObj)
{
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
+// We are only looking for TYPE not the rest here, and why is FullUnique filled up with
CRAP!?
+// DPRINT1("FullUnique -> %x\n", Entry->FullUnique);
if((Entry->Type & GDI_ENTRY_BASETYPE_MASK) != 0 &&
- (Entry->Type << GDI_ENTRY_UPPER_SHIFT) == GDI_HANDLE_GET_UPPER(hGdiObj))
+ ( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
+
GDI_HANDLE_GET_TYPE(hGdiObj))
{
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
if(pid == NULL || pid == CurrentProcessId)
@@ -120,7 +123,8 @@
{
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
if((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == ObjectType &&
- (Entry->Type << GDI_ENTRY_UPPER_SHIFT) == GDI_HANDLE_GET_UPPER(hGdiObj))
+ ( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
+
GDI_HANDLE_GET_TYPE(hGdiObj))
{
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
if(pid == NULL || pid == CurrentProcessId)