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:
Jacek Caban 2021-07-02 12:41:12 +02:00 committed by Alexandre Julliard
parent 341be5f3f2
commit 7c957ec998
2 changed files with 11 additions and 17 deletions

View File

@ -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.@)
*

View File

@ -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.@)
*