gdi32: Introduce NtGdiExtGetObjectW.
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
5d9586a60b
commit
14a39fcfe7
|
@ -1060,9 +1060,9 @@ INT WINAPI GetObjectA( HGDIOBJ handle, INT count, LPVOID buffer )
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetObjectW (GDI32.@)
|
||||
* NtGdiExtGetObjectW (win32u.@)
|
||||
*/
|
||||
INT WINAPI GetObjectW( HGDIOBJ handle, INT count, LPVOID buffer )
|
||||
INT WINAPI NtGdiExtGetObjectW( HGDIOBJ handle, INT count, void *buffer )
|
||||
{
|
||||
GDI_HANDLE_ENTRY *entry;
|
||||
const struct gdi_obj_funcs *funcs = NULL;
|
||||
|
@ -1078,11 +1078,9 @@ INT WINAPI GetObjectW( HGDIOBJ handle, INT count, LPVOID buffer )
|
|||
}
|
||||
LeaveCriticalSection( &gdi_section );
|
||||
|
||||
if (funcs)
|
||||
if (funcs && funcs->pGetObjectW)
|
||||
{
|
||||
if (!funcs->pGetObjectW)
|
||||
SetLastError( ERROR_INVALID_HANDLE );
|
||||
else if (buffer && ((ULONG_PTR)buffer >> 16) == 0) /* catch apps getting argument order wrong */
|
||||
if (buffer && ((ULONG_PTR)buffer >> 16) == 0) /* catch apps getting argument order wrong */
|
||||
SetLastError( ERROR_NOACCESS );
|
||||
else
|
||||
result = funcs->pGetObjectW( handle, count, buffer );
|
||||
|
|
|
@ -111,3 +111,32 @@ HGDIOBJ WINAPI SelectObject( HDC hdc, HGDIOBJ obj )
|
|||
if (!ret) SetLastError( ERROR_INVALID_HANDLE );
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetObjectW (GDI32.@)
|
||||
*/
|
||||
INT WINAPI GetObjectW( HGDIOBJ handle, INT count, void *buffer )
|
||||
{
|
||||
int result;
|
||||
|
||||
TRACE( "%p %d %p\n", handle, count, buffer );
|
||||
|
||||
result = NtGdiExtGetObjectW( handle, count, buffer );
|
||||
if (!result && count)
|
||||
{
|
||||
switch(get_object_type( handle ))
|
||||
{
|
||||
case 0:
|
||||
case OBJ_BITMAP:
|
||||
case OBJ_BRUSH:
|
||||
case OBJ_FONT:
|
||||
case OBJ_PAL:
|
||||
case OBJ_PEN:
|
||||
case OBJ_EXTPEN:
|
||||
break;
|
||||
default:
|
||||
SetLastError( ERROR_INVALID_HANDLE );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue