Author: tkreuzer
Date: Sun Oct 1 07:53:54 2017
New Revision: 76011
URL:
http://svn.reactos.org/svn/reactos?rev=76011&view=rev
Log:
[GDI32] Remove obsolete function GdiIsHandleValid, which is just a copy of
GdiValidateHandle
Modified:
trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h
trunk/reactos/win32ss/gdi/gdi32/misc/misc.c
trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c
trunk/reactos/win32ss/gdi/gdi32/objects/dc.c
trunk/reactos/win32ss/gdi/gdi32/objects/gdiobj.c
trunk/reactos/win32ss/gdi/gdi32/objects/painting.c
trunk/reactos/win32ss/gdi/gdi32/objects/region.c
Modified: trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/include/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h [iso-8859-1] Sun Oct 1 07:53:54
2017
@@ -202,7 +202,8 @@
DeleteRegion( HRGN );
BOOL
-GdiIsHandleValid(HGDIOBJ hGdiObj);
+WINAPI
+GdiValidateHandle(HGDIOBJ);
BOOL
GdiGetHandleUserData(
Modified: trunk/reactos/win32ss/gdi/gdi32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/misc/mis…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/misc/misc.c [iso-8859-1] Sun Oct 1 07:53:54 2017
@@ -745,24 +745,6 @@
return (PVOID)GdiHandleTable;
}
-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_TYPE_MASK
) ==
- GDI_HANDLE_GET_TYPE(hGdiObj))
- {
- HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
- if(pid == NULL || pid == CurrentProcessId)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, DWORD ObjectType, PVOID *UserData)
{
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c [iso-8859-1] Sun Oct 1 07:53:54
2017
@@ -363,7 +363,7 @@
UINT cjBmpScanSize;
UINT cjInfoSize;
- if (!hDC || !GdiIsHandleValid((HGDIOBJ) hDC) || !lpbmi)
+ if (!hDC || !GdiValidateHandle((HGDIOBJ) hDC) || !lpbmi)
{
GdiSetLastError(ERROR_INVALID_PARAMETER);
return 0;
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/dc.c [iso-8859-1] Sun Oct 1 07:53:54 2017
@@ -1500,7 +1500,7 @@
{
/* Fix up 16 bit handles */
hobj = GdiFixUpHandle(hobj);
- if (!GdiIsHandleValid(hobj))
+ if (!GdiValidateHandle(hobj))
{
return NULL;
}
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/gdiobj.c [iso-8859-1] Sun Oct 1 07:53:54
2017
@@ -23,7 +23,7 @@
{
hobj = NtGdiGetStockObject(fnObject);
- if (!GdiIsHandleValid(hobj))
+ if (!GdiValidateHandle(hobj))
{
return NULL;
}
@@ -45,7 +45,7 @@
{
DWORD Ret = 0;
- if (GdiIsHandleValid(h))
+ if (GdiValidateHandle(h))
{
LONG Type = GDI_HANDLE_GET_TYPE(h);
switch(Type)
@@ -249,7 +249,7 @@
/* Handle error */
if (cbResult == 0)
{
- if (!GdiIsHandleValid(hGdiObj))
+ if (!GdiValidateHandle(hGdiObj))
{
if ((dwType == GDI_OBJECT_TYPE_PEN) ||
(dwType == GDI_OBJECT_TYPE_EXTPEN) ||
@@ -316,7 +316,7 @@
{
/* Check if the handle is valid (FIXME: we need some special
sauce for the stock object flag) */
- if (!GdiIsHandleValid(hObject))
+ if (!GdiValidateHandle(hObject))
return FALSE;
/* Check if this is a stock object */
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/painting.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/painting.c [iso-8859-1] Sun Oct 1 07:53:54
2017
@@ -128,7 +128,7 @@
_In_ INT y)
{
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) return CLR_INVALID;
- if (!GdiIsHandleValid((HGDIOBJ) hdc)) return CLR_INVALID;
+ if (!GdiValidateHandle((HGDIOBJ) hdc)) return CLR_INVALID;
return NtGdiGetPixel(hdc, x, y);
}
@@ -479,7 +479,7 @@
if ((GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_METADC16_TYPE) ||
(GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_ALTDC_TYPE))
{
- if (!GdiIsHandleValid(hdc))
+ if (!GdiValidateHandle(hdc))
{
return FALSE;
}
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/region.c [iso-8859-1] Sun Oct 1 07:53:54
2017
@@ -186,7 +186,7 @@
_In_ HRGN hrgn,
_In_ HRGN *phrn)
{
- if (!GdiIsHandleValid((HGDIOBJ) hdc) ||
+ if (!GdiValidateHandle((HGDIOBJ) hdc) ||
(GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC))
return 0;