win32u: Move NtUserCloseWindowStation 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-12 16:42:35 +02:00 committed by Alexandre Julliard
parent 8f31eb1edb
commit d7ae3591ec
13 changed files with 119 additions and 22 deletions

View File

@ -4335,7 +4335,7 @@ static BOOL CALLBACK bcast_winsta( LPWSTR winsta, LPARAM lp )
return TRUE;
((BroadcastParm *)lp)->winsta = hwinsta;
ret = EnumDesktopsW( hwinsta, bcast_desktop, lp );
CloseWindowStation( hwinsta );
NtUserCloseWindowStation( hwinsta );
TRACE("-->%d\n", ret);
return ret;
}

View File

@ -77,7 +77,7 @@
@ stdcall CloseDesktop(long)
@ stdcall CloseTouchInputHandle(long)
@ stdcall CloseWindow(long)
@ stdcall CloseWindowStation(long)
@ stdcall CloseWindowStation(long) NtUserCloseWindowStation
@ stdcall CopyAcceleratorTableA(long ptr long)
@ stdcall CopyAcceleratorTableW(long ptr long)
@ stdcall CopyIcon(long)

View File

@ -25,7 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ntuser.h"
#include "winreg.h"
#include "winternl.h"
#include "hidusage.h"

View File

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

View File

@ -37,6 +37,7 @@ C_SRCS = \
syscall.c \
vertical.c \
vulkan.c \
winstation.c \
wrappers.c
font_EXTRADEFS = -DWINE_FONT_DIR=\"`${MAKEDEP} -R ${datadir}/wine ${fontdir}`\"

View File

@ -29,6 +29,7 @@
#include "windef.h"
#include "winnt.h"
#include "ntgdi_private.h"
#include "ntuser.h"
#include "wine/unixlib.h"
@ -93,6 +94,7 @@ static void * const syscalls[] =
NtGdiSetVirtualResolution,
NtGdiSwapBuffers,
NtGdiTransformPoints,
NtUserCloseWindowStation,
};
static BYTE arguments[ARRAY_SIZE(syscalls)];

View File

@ -795,7 +795,7 @@
@ stub NtUserClipCursor
@ stub NtUserCloseClipboard
@ stub NtUserCloseDesktop
@ stub NtUserCloseWindowStation
@ stdcall -syscall NtUserCloseWindowStation(long)
@ stub NtUserCompositionInputSinkLuidFromPoint
@ stub NtUserCompositionInputSinkViewInstanceIdFromPoint
@ stub NtUserConfigureActivationObject

45
dlls/win32u/winstation.c Normal file
View File

@ -0,0 +1,45 @@
/*
* Window stations and desktops
*
* Copyright 2002 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ntuser.h"
#include "winternl.h"
#include "wine/server.h"
/***********************************************************************
* NtUserCloseWindowStation (win32u.@)
*/
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle )
{
BOOL ret;
SERVER_START_REQ( close_winstation )
{
req->handle = wine_server_obj_handle( handle );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View File

@ -5,4 +5,5 @@ EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f200000
C_SRCS = \
gdi.c \
syscall.c
syscall.c \
user.c

View File

@ -80,6 +80,7 @@
SYSCALL_ENTRY( NtGdiSetTextJustification ) \
SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints )
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserCloseWindowStation )
#endif /* __WOW64WIN_SYSCALL_H */

35
dlls/wow64win/user.c Normal file
View File

@ -0,0 +1,35 @@
/*
* WoW64 User functions
*
* Copyright 2021 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "ntuser.h"
#include "wow64win_private.h"
NTSTATUS WINAPI wow64_NtUserCloseWindowStation( UINT *args )
{
HWINSTA handle = get_handle( &args );
return NtUserCloseWindowStation( handle );
}

View File

@ -551,6 +551,7 @@ SOURCES = \
ntsecapi.h \
ntsecpkg.h \
ntstatus.h \
ntuser.h \
oaidl.idl \
objbase.h \
objectarray.idl \

27
include/ntuser.h Normal file
View File

@ -0,0 +1,27 @@
/*
* Copyright 2021 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _NTUSER_
#define _NTUSER_
#include <winuser.h>
#include <winternl.h>
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
#endif /* _NTUSER_ */