win32u: Move NtUserOpenInputDesktop 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:54:56 +02:00 committed by Alexandre Julliard
parent ce9fc213a7
commit af7ed8a538
8 changed files with 42 additions and 27 deletions

View File

@ -556,7 +556,7 @@
@ stdcall OpenDesktopA(str long long long)
@ stdcall OpenDesktopW(wstr long long long)
@ stdcall OpenIcon(long)
@ stdcall OpenInputDesktop(long long long)
@ stdcall OpenInputDesktop(long long long) NtUserOpenInputDesktop
@ stdcall OpenWindowStationA(str long long)
@ stdcall OpenWindowStationW(wstr long long)
@ stdcall PackDDElParam(long long long)

View File

@ -426,31 +426,6 @@ BOOL WINAPI EnumDesktopsW( HWINSTA winsta, DESKTOPENUMPROCW func, LPARAM lparam
}
/******************************************************************************
* OpenInputDesktop (USER32.@)
*/
HDESK WINAPI OpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access )
{
HANDLE ret = 0;
TRACE( "(%x,%i,%x)\n", flags, inherit, access );
if (flags)
FIXME( "partial stub flags %08x\n", flags );
SERVER_START_REQ( open_input_desktop )
{
req->flags = flags;
req->access = access;
req->attributes = inherit ? OBJ_INHERIT : 0;
if (!wine_server_call_err( req )) ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* GetUserObjectInformationA (USER32.@)
*/

View File

@ -98,6 +98,7 @@ static void * const syscalls[] =
NtUserCloseWindowStation,
NtUserGetProcessWindowStation,
NtUserGetThreadDesktop,
NtUserOpenInputDesktop,
NtUserSetProcessWindowStation,
NtUserSetThreadDesktop,
};

View File

@ -1092,7 +1092,7 @@
@ stub NtUserNotifyWinEvent
@ stub NtUserOpenClipboard
@ stub NtUserOpenDesktop
@ stub NtUserOpenInputDesktop
@ stdcall -syscall NtUserOpenInputDesktop(long long long)
@ stub NtUserOpenThreadDesktop
@ stub NtUserOpenWindowStation
@ stub NtUserPaintDesktop

View File

@ -28,6 +28,10 @@
#include "ntuser.h"
#include "winternl.h"
#include "wine/server.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(winstation);
/***********************************************************************
* NtUserCloseWindowStation (win32u.@)
@ -124,3 +128,27 @@ BOOL WINAPI NtUserSetThreadDesktop( HDESK handle )
/* FIXME: reset uset thread info */
return ret;
}
/***********************************************************************
* NtUserOpenInputDesktop (win32u.@)
*/
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access )
{
HANDLE ret = 0;
TRACE( "(%x,%i,%x)\n", flags, inherit, access );
if (flags)
FIXME( "partial stub flags %08x\n", flags );
SERVER_START_REQ( open_input_desktop )
{
req->flags = flags;
req->access = access;
req->attributes = inherit ? OBJ_INHERIT : 0;
if (!wine_server_call_err( req )) ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}

View File

@ -85,6 +85,7 @@
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetThreadDesktop )

View File

@ -66,3 +66,12 @@ NTSTATUS WINAPI wow64_NtUserSetThreadDesktop( UINT *args )
return NtUserSetThreadDesktop( handle );
}
NTSTATUS WINAPI wow64_NtUserOpenInputDesktop( UINT *args )
{
DWORD flags = get_ulong( &args );
BOOL inherit = get_ulong( &args );
ACCESS_MASK access = get_ulong( &args );
return HandleToUlong( NtUserOpenInputDesktop( flags, inherit, access ));
}

View File

@ -26,6 +26,7 @@ BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );