Commit 9f041bb2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserSetObjectInformation implementation from user32.

parent b55abd07
...@@ -713,7 +713,7 @@ ...@@ -713,7 +713,7 @@
@ stdcall SetThreadDpiAwarenessContext(ptr) @ stdcall SetThreadDpiAwarenessContext(ptr)
@ stdcall SetTimer(long long long ptr) @ stdcall SetTimer(long long long ptr)
@ stdcall SetUserObjectInformationA(long long ptr long) @ stdcall SetUserObjectInformationA(long long ptr long)
@ stdcall SetUserObjectInformationW(long long ptr long) @ stdcall SetUserObjectInformationW(long long ptr long) NtUserSetObjectInformation
@ stdcall SetUserObjectSecurity(long ptr ptr) @ stdcall SetUserObjectSecurity(long ptr ptr)
@ stdcall SetWinEventHook(long long long ptr long long long) @ stdcall SetWinEventHook(long long long ptr long long long)
@ stdcall SetWindowCompositionAttribute(ptr ptr) @ stdcall SetWindowCompositionAttribute(ptr ptr)
......
...@@ -303,7 +303,7 @@ static void winstation_init(void) ...@@ -303,7 +303,7 @@ static void winstation_init(void)
flags.fInherit = FALSE; flags.fInherit = FALSE;
flags.fReserved = FALSE; flags.fReserved = FALSE;
flags.dwFlags = WSF_VISIBLE; flags.dwFlags = WSF_VISIBLE;
SetUserObjectInformationW( handle, UOI_FLAGS, &flags, sizeof(flags) ); NtUserSetObjectInformation( handle, UOI_FLAGS, &flags, sizeof(flags) );
} }
} }
} }
......
...@@ -461,33 +461,7 @@ BOOL WINAPI GetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DW ...@@ -461,33 +461,7 @@ BOOL WINAPI GetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DW
*/ */
BOOL WINAPI SetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DWORD len ) BOOL WINAPI SetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DWORD len )
{ {
return SetUserObjectInformationW( handle, index, info, len ); return NtUserSetObjectInformation( handle, index, info, len );
}
/******************************************************************************
* SetUserObjectInformationW (USER32.@)
*/
BOOL WINAPI SetUserObjectInformationW( HANDLE handle, INT index, LPVOID info, DWORD len )
{
BOOL ret;
const USEROBJECTFLAGS *obj_flags = info;
if (index != UOI_FLAGS || !info || len < sizeof(*obj_flags))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* FIXME: inherit flag */
SERVER_START_REQ( set_user_object_info )
{
req->handle = wine_server_obj_handle( handle );
req->flags = SET_USER_OBJECT_SET_FLAGS;
req->obj_flags = obj_flags->dwFlags;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
} }
......
...@@ -100,6 +100,7 @@ static void * const syscalls[] = ...@@ -100,6 +100,7 @@ static void * const syscalls[] =
NtUserGetProcessWindowStation, NtUserGetProcessWindowStation,
NtUserGetThreadDesktop, NtUserGetThreadDesktop,
NtUserOpenInputDesktop, NtUserOpenInputDesktop,
NtUserSetObjectInformation,
NtUserSetProcessWindowStation, NtUserSetProcessWindowStation,
NtUserSetThreadDesktop, NtUserSetThreadDesktop,
}; };
......
...@@ -1213,7 +1213,7 @@ ...@@ -1213,7 +1213,7 @@
@ stub NtUserSetMirrorRendering @ stub NtUserSetMirrorRendering
@ stub NtUserSetMonitorWorkArea @ stub NtUserSetMonitorWorkArea
@ stub NtUserSetMouseInputRateLimitingTimer @ stub NtUserSetMouseInputRateLimitingTimer
@ stub NtUserSetObjectInformation @ stdcall -syscall NtUserSetObjectInformation(long long ptr long)
@ stub NtUserSetParent @ stub NtUserSetParent
@ stub NtUserSetPrecisionTouchPadConfiguration @ stub NtUserSetPrecisionTouchPadConfiguration
@ stub NtUserSetProcessDpiAwarenessContext @ stub NtUserSetProcessDpiAwarenessContext
......
...@@ -246,3 +246,28 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, ...@@ -246,3 +246,28 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
return FALSE; return FALSE;
} }
} }
/***********************************************************************
* NtUserSetObjectInformation (win32u.@)
*/
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len )
{
BOOL ret;
const USEROBJECTFLAGS *obj_flags = info;
if (index != UOI_FLAGS || !info || len < sizeof(*obj_flags))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
/* FIXME: inherit flag */
SERVER_START_REQ( set_user_object_info )
{
req->handle = wine_server_obj_handle( handle );
req->flags = SET_USER_OBJECT_SET_FLAGS;
req->obj_flags = obj_flags->dwFlags;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetThreadDesktop ) SYSCALL_ENTRY( NtUserSetThreadDesktop )
......
...@@ -86,3 +86,13 @@ NTSTATUS WINAPI wow64_NtUserGetObjectInformation( UINT *args ) ...@@ -86,3 +86,13 @@ NTSTATUS WINAPI wow64_NtUserGetObjectInformation( UINT *args )
return NtUserGetObjectInformation( handle, index, info, len, needed ); return NtUserGetObjectInformation( handle, index, info, len, needed );
} }
NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args )
{
HANDLE handle = get_handle( &args );
INT index = get_ulong( &args );
void *info = get_ptr( &args );
DWORD len = get_ulong( &args );
return NtUserSetObjectInformation( handle, index, info, len );
}
...@@ -28,6 +28,7 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, ...@@ -28,6 +28,7 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD len, DWORD *needed ); DWORD len, DWORD *needed );
HWINSTA WINAPI NtUserGetProcessWindowStation(void); HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ); HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access ); HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle ); BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
BOOL WINAPI NtUserSetThreadDesktop( HDESK handle ); BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment