diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 6f0f58a5f3f..7e6b660b8af 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -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; } diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 8d5f1bc4145..21b45c911d1 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -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) diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 0be02919bbe..5c01006565c 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -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" diff --git a/dlls/user32/winstation.c b/dlls/user32/winstation.c index 95a9eb85099..057f0d75cb8 100644 --- a/dlls/user32/winstation.c +++ b/dlls/user32/winstation.c @@ -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.@) */ diff --git a/dlls/win32u/Makefile.in b/dlls/win32u/Makefile.in index 38109f8bc11..feb1e6a3eb2 100644 --- a/dlls/win32u/Makefile.in +++ b/dlls/win32u/Makefile.in @@ -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}`\" diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index eaff8cb639a..596ec6bbba3 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -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)]; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 396b67ede5a..92f9a143800 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -795,7 +795,7 @@ @ stub NtUserClipCursor @ stub NtUserCloseClipboard @ stub NtUserCloseDesktop -@ stub NtUserCloseWindowStation +@ stdcall -syscall NtUserCloseWindowStation(long) @ stub NtUserCompositionInputSinkLuidFromPoint @ stub NtUserCompositionInputSinkViewInstanceIdFromPoint @ stub NtUserConfigureActivationObject diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c new file mode 100644 index 00000000000..f50464f856d --- /dev/null +++ b/dlls/win32u/winstation.c @@ -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 +#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; +} diff --git a/dlls/wow64win/Makefile.in b/dlls/wow64win/Makefile.in index 9445182af5c..99301c4edf1 100644 --- a/dlls/wow64win/Makefile.in +++ b/dlls/wow64win/Makefile.in @@ -5,4 +5,5 @@ EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x6f200000 C_SRCS = \ gdi.c \ - syscall.c + syscall.c \ + user.c diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 880c840ea02..276c83474fe 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -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 */ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c new file mode 100644 index 00000000000..7370a3d4940 --- /dev/null +++ b/dlls/wow64win/user.c @@ -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 + +#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 ); +} diff --git a/include/Makefile.in b/include/Makefile.in index eac1c2e0570..ef4a6d55558 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -551,6 +551,7 @@ SOURCES = \ ntsecapi.h \ ntsecpkg.h \ ntstatus.h \ + ntuser.h \ oaidl.idl \ objbase.h \ objectarray.idl \ diff --git a/include/ntuser.h b/include/ntuser.h new file mode 100644 index 00000000000..8b09f732ecd --- /dev/null +++ b/include/ntuser.h @@ -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 +#include + +BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle ); + +#endif /* _NTUSER_ */