mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[GDI32] Remove obsolete function GdiIsHandleValid, which is just a copy of GdiValidateHandle
svn path=/trunk/; revision=76011
This commit is contained in:
parent
552e8c13bb
commit
c500afd0fa
7 changed files with 11 additions and 28 deletions
|
@ -202,7 +202,8 @@ FASTCALL
|
|||
DeleteRegion( HRGN );
|
||||
|
||||
BOOL
|
||||
GdiIsHandleValid(HGDIOBJ hGdiObj);
|
||||
WINAPI
|
||||
GdiValidateHandle(HGDIOBJ);
|
||||
|
||||
BOOL
|
||||
GdiGetHandleUserData(
|
||||
|
|
|
@ -745,24 +745,6 @@ GdiQueryTable(VOID)
|
|||
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);
|
||||
|
|
|
@ -363,7 +363,7 @@ GetDIBits(
|
|||
UINT cjBmpScanSize;
|
||||
UINT cjInfoSize;
|
||||
|
||||
if (!hDC || !GdiIsHandleValid((HGDIOBJ) hDC) || !lpbmi)
|
||||
if (!hDC || !GdiValidateHandle((HGDIOBJ) hDC) || !lpbmi)
|
||||
{
|
||||
GdiSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
|
|
@ -1500,7 +1500,7 @@ SelectObject(
|
|||
{
|
||||
/* Fix up 16 bit handles */
|
||||
hobj = GdiFixUpHandle(hobj);
|
||||
if (!GdiIsHandleValid(hobj))
|
||||
if (!GdiValidateHandle(hobj))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ GetStockObject(
|
|||
{
|
||||
hobj = NtGdiGetStockObject(fnObject);
|
||||
|
||||
if (!GdiIsHandleValid(hobj))
|
||||
if (!GdiValidateHandle(hobj))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ GetObjectType(
|
|||
{
|
||||
DWORD Ret = 0;
|
||||
|
||||
if (GdiIsHandleValid(h))
|
||||
if (GdiValidateHandle(h))
|
||||
{
|
||||
LONG Type = GDI_HANDLE_GET_TYPE(h);
|
||||
switch(Type)
|
||||
|
@ -249,7 +249,7 @@ GetObjectW(
|
|||
/* 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 @@ DeleteObject(HGDIOBJ hObject)
|
|||
{
|
||||
/* 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 */
|
||||
|
|
|
@ -128,7 +128,7 @@ GetPixel(
|
|||
_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 @@ PolyPatBlt(
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ MirrorRgnDC(
|
|||
_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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue