win32u: Move NtUserSetProcessWindowStation implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-10-13 14:53:22 +02:00 committed by Alexandre Julliard
parent 588dc55e9e
commit 187b3e2cdf
9 changed files with 30 additions and 21 deletions

View File

@ -692,7 +692,7 @@
@ stdcall SetProcessDefaultLayout(long)
@ stdcall SetProcessDpiAwarenessContext(long)
@ stdcall SetProcessDpiAwarenessInternal(long)
@ stdcall SetProcessWindowStation(long)
@ stdcall SetProcessWindowStation(long) NtUserSetProcessWindowStation
@ stdcall SetProgmanWindow (long)
@ stdcall SetPropA(long str long)
@ stdcall SetPropW(long wstr long)

View File

@ -295,7 +295,7 @@ static void winstation_init(void)
handle = CreateWindowStationW( winstation ? winstation : L"WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
if (handle)
{
SetProcessWindowStation( handle );
NtUserSetProcessWindowStation( handle );
/* only WinSta0 is visible */
if (!winstation || !wcsicmp( winstation, L"WinSta0" ))
{

View File

@ -203,23 +203,6 @@ HWINSTA WINAPI OpenWindowStationW( LPCWSTR name, BOOL inherit, ACCESS_MASK acces
}
/***********************************************************************
* SetProcessWindowStation (USER32.@)
*/
BOOL WINAPI SetProcessWindowStation( HWINSTA handle )
{
BOOL ret;
SERVER_START_REQ( set_process_winstation )
{
req->handle = wine_server_obj_handle( handle );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/******************************************************************************
* EnumWindowStationsA (USER32.@)
*/

View File

@ -96,6 +96,7 @@ static void * const syscalls[] =
NtGdiTransformPoints,
NtUserCloseWindowStation,
NtUserGetProcessWindowStation,
NtUserSetProcessWindowStation,
};
static BYTE arguments[ARRAY_SIZE(syscalls)];

View File

@ -1221,7 +1221,7 @@
@ stub NtUserSetProcessMousewheelRoutingMode
@ stub NtUserSetProcessRestrictionExemption
@ stub NtUserSetProcessUIAccessZorder
@ stub NtUserSetProcessWindowStation
@ stdcall -syscall NtUserSetProcessWindowStation(long)
@ stub NtUserSetProp
@ stub NtUserSetScrollInfo
@ stub NtUserSetSensorPresence

View File

@ -59,3 +59,19 @@ HWINSTA WINAPI NtUserGetProcessWindowStation(void)
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* NtUserSetProcessWindowStation (win32u.@)
*/
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle )
{
BOOL ret;
SERVER_START_REQ( set_process_winstation )
{
req->handle = wine_server_obj_handle( handle );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View File

@ -82,6 +82,7 @@
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation )
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation )
#endif /* __WOW64WIN_SYSCALL_H */

View File

@ -38,3 +38,10 @@ NTSTATUS WINAPI wow64_NtUserGetProcessWindowStation( UINT *args )
{
return HandleToUlong( NtUserGetProcessWindowStation() );
}
NTSTATUS WINAPI wow64_NtUserSetProcessWindowStation( UINT *args )
{
HWINSTA handle = get_handle( &args );
return NtUserSetProcessWindowStation( handle );
}

View File

@ -24,5 +24,6 @@
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
#endif /* _NTUSER_ */