Jacek Caban : win32u: Use syscall interface for NtUserGetMessage.
Alexandre Julliard
julliard at winehq.org
Fri Jul 22 15:37:21 CDT 2022
Module: wine
Branch: master
Commit: 0d6d8f388aea4889a79a913fea7c10b1056ffdd2
URL: https://gitlab.winehq.org/wine/wine/-/commit/0d6d8f388aea4889a79a913fea7c10b1056ffdd2
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat Jul 9 18:01:02 2022 +0200
win32u: Use syscall interface for NtUserGetMessage.
---
dlls/win32u/gdiobj.c | 1 -
dlls/win32u/syscall.c | 1 +
dlls/win32u/win32u.spec | 2 +-
dlls/win32u/win32u_private.h | 1 -
dlls/win32u/wrappers.c | 6 ------
dlls/wow64win/syscall.h | 1 +
dlls/wow64win/user.c | 13 +++++++++++++
7 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c
index b20e3a7ddbb..a7bb62f29aa 100644
--- a/dlls/win32u/gdiobj.c
+++ b/dlls/win32u/gdiobj.c
@@ -1180,7 +1180,6 @@ static struct unix_funcs unix_funcs =
NtUserGetKeyNameText,
NtUserGetKeyboardLayoutList,
NtUserGetMenuBarInfo,
- NtUserGetMessage,
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetScrollBarInfo,
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index eeebf521bc2..a181c07402a 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -143,6 +143,7 @@ static void * const syscalls[] =
NtUserGetKeyboardState,
NtUserGetLayeredWindowAttributes,
NtUserGetMenuItemRect,
+ NtUserGetMessage,
NtUserGetMouseMovePointsEx,
NtUserGetObjectInformation,
NtUserGetOpenClipboardWindow,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 83de1ab87c8..6ba3d5492e7 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -955,7 +955,7 @@
@ stdcall NtUserGetMenuBarInfo(long long long ptr)
@ stub NtUserGetMenuIndex
@ stdcall -syscall NtUserGetMenuItemRect(long long long ptr)
-@ stdcall NtUserGetMessage(ptr long long long)
+@ stdcall -syscall NtUserGetMessage(ptr long long long)
@ stdcall -syscall NtUserGetMouseMovePointsEx(long ptr ptr long long)
@ stdcall -syscall NtUserGetObjectInformation(long long long long ptr)
@ stub NtUserGetOemBitmapSize
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index bdc8235a831..74fb4f4b088 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -244,7 +244,6 @@ struct unix_funcs
INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size );
UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts );
BOOL (WINAPI *pNtUserGetMenuBarInfo)( HWND hwnd, LONG id, LONG item, MENUBARINFO *info );
- BOOL (WINAPI *pNtUserGetMessage)( MSG *msg, HWND hwnd, UINT first, UINT last );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c
index 923254dcf96..ed7b24a1f5f 100644
--- a/dlls/win32u/wrappers.c
+++ b/dlls/win32u/wrappers.c
@@ -1000,12 +1000,6 @@ BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *in
return unix_funcs->pNtUserGetMenuBarInfo( hwnd, id, item, info );
}
-BOOL WINAPI NtUserGetMessage( MSG *msg, HWND hwnd, UINT first, UINT last )
-{
- if (!unix_funcs) return FALSE;
- return unix_funcs->pNtUserGetMessage( msg, hwnd, first, last );
-}
-
HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert )
{
if (!unix_funcs) return 0;
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index 937abaf8b3b..2955b4105d6 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -130,6 +130,7 @@
SYSCALL_ENTRY( NtUserGetKeyboardState ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
SYSCALL_ENTRY( NtUserGetMenuItemRect ) \
+ SYSCALL_ENTRY( NtUserGetMessage ) \
SYSCALL_ENTRY( NtUserGetMouseMovePointsEx ) \
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
SYSCALL_ENTRY( NtUserGetOpenClipboardWindow ) \
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c
index be91b830e7a..b0a7f93df41 100644
--- a/dlls/wow64win/user.c
+++ b/dlls/wow64win/user.c
@@ -519,6 +519,19 @@ NTSTATUS WINAPI wow64_NtUserGetMenuItemRect( UINT *args )
return NtUserGetMenuItemRect( hwnd, handle, item, rect );
}
+NTSTATUS WINAPI wow64_NtUserGetMessage( UINT *args )
+{
+ MSG32 *msg32 = get_ptr( &args );
+ HWND hwnd = get_handle( &args );
+ UINT first = get_ulong( &args );
+ UINT last = get_ulong( &args );
+ MSG msg;
+
+ if (!NtUserGetMessage( &msg, hwnd, first, last )) return FALSE;
+ msg_64to32( &msg, msg32 );
+ return TRUE;
+}
+
NTSTATUS WINAPI wow64_NtUserGetMouseMovePointsEx( UINT *args )
{
UINT size = get_ulong( &args );
More information about the wine-cvs
mailing list