gdi32: Use get_object_type for GetObjectType implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
341be5f3f2
commit
7c957ec998
|
@ -1090,23 +1090,6 @@ INT WINAPI GetObjectW( HGDIOBJ handle, INT count, LPVOID buffer )
|
|||
return result;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetObjectType (GDI32.@)
|
||||
*/
|
||||
DWORD WINAPI GetObjectType( HGDIOBJ handle )
|
||||
{
|
||||
GDI_HANDLE_ENTRY *entry;
|
||||
DWORD result = 0;
|
||||
|
||||
EnterCriticalSection( &gdi_section );
|
||||
if ((entry = handle_entry( handle ))) result = entry->Type;
|
||||
LeaveCriticalSection( &gdi_section );
|
||||
|
||||
TRACE("%p -> %u\n", handle, result );
|
||||
if (!result) SetLastError( ERROR_INVALID_HANDLE );
|
||||
return result;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentObject (GDI32.@)
|
||||
*
|
||||
|
|
|
@ -64,6 +64,17 @@ static WORD get_object_type( HGDIOBJ obj )
|
|||
return entry ? entry->Type : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetObjectType (GDI32.@)
|
||||
*/
|
||||
DWORD WINAPI GetObjectType( HGDIOBJ handle )
|
||||
{
|
||||
DWORD result = get_object_type( handle );
|
||||
TRACE("%p -> %u\n", handle, result );
|
||||
if (!result) SetLastError( ERROR_INVALID_HANDLE );
|
||||
return result;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SelectObject (GDI32.@)
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue