From: Jacek Caban jacek@codeweavers.com
--- 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 );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 5 ---- dlls/win32u/syscall.c | 5 ++++ dlls/win32u/win32u.spec | 10 +++---- dlls/win32u/win32u_private.h | 5 ---- dlls/win32u/wrappers.c | 30 --------------------- dlls/wow64win/syscall.h | 5 ++++ dlls/wow64win/user.c | 52 ++++++++++++++++++++++++++++++++++++ 7 files changed, 67 insertions(+), 45 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index a7bb62f29aa..08852856a95 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1197,9 +1197,6 @@ static struct unix_funcs unix_funcs = NtUserMapVirtualKeyEx, NtUserMoveWindow, NtUserOpenClipboard, - NtUserPeekMessage, - NtUserPostMessage, - NtUserPostThreadMessage, NtUserRedrawWindow, NtUserRegisterClassExWOW, NtUserRegisterHotKey, @@ -1242,12 +1239,10 @@ static struct unix_funcs unix_funcs = NtUserToUnicodeEx, NtUserTrackMouseEvent, NtUserTranslateAccelerator, - NtUserTranslateMessage, NtUserUnregisterClass, NtUserUnregisterHotKey, NtUserUpdateLayeredWindow, NtUserVkKeyScanEx, - NtUserWaitForInputIdle, NtUserWindowFromPoint,
SetDIBits, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index a181c07402a..f5ede759090 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -170,6 +170,9 @@ static void * const syscalls[] = NtUserOpenDesktop, NtUserOpenInputDesktop, NtUserOpenWindowStation, + NtUserPeekMessage, + NtUserPostMessage, + NtUserPostThreadMessage, NtUserQueryInputContext, NtUserRegisterRawInputDevices, NtUserRemoveClipboardFormatListener, @@ -190,9 +193,11 @@ static void * const syscalls[] = NtUserThunkedMenuInfo, NtUserThunkedMenuItemInfo, NtUserTrackPopupMenuEx, + NtUserTranslateMessage, NtUserUnhookWinEvent, NtUserUnhookWindowsHookEx, NtUserUpdateInputContext, + NtUserWaitForInputIdle, NtUserWindowFromDC, };
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 6ba3d5492e7..3e04342a645 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1098,13 +1098,13 @@ @ stub NtUserPaintDesktop @ stub NtUserPaintMenuBar @ stub NtUserPaintMonitor -@ stdcall NtUserPeekMessage(ptr long long long long) +@ stdcall -syscall NtUserPeekMessage(ptr long long long long) @ stub NtUserPerMonitorDPIPhysicalToLogicalPoint @ stub NtUserPhysicalToLogicalDpiPointForWindow @ stub NtUserPhysicalToLogicalPoint @ stub NtUserPostKeyboardInputMessage -@ stdcall NtUserPostMessage(long long long long) -@ stdcall NtUserPostThreadMessage(long long long long) +@ stdcall -syscall NtUserPostMessage(long long long long) +@ stdcall -syscall NtUserPostThreadMessage(long long long long) @ stub NtUserPrintWindow @ stub NtUserProcessConnect @ stub NtUserProcessInkFeedbackCommand @@ -1282,7 +1282,7 @@ @ stub NtUserTransformPoint @ stub NtUserTransformRect @ stdcall NtUserTranslateAccelerator(long long ptr) -@ stdcall NtUserTranslateMessage(ptr long) +@ stdcall -syscall NtUserTranslateMessage(ptr long) @ stub NtUserUndelegateInput @ stdcall -syscall NtUserUnhookWinEvent(long) @ stdcall -syscall NtUserUnhookWindowsHookEx(long) @@ -1305,7 +1305,7 @@ @ stdcall NtUserVkKeyScanEx(long long) @ stub NtUserWOWCleanup @ stub NtUserWaitAvailableMessageEx -@ stdcall NtUserWaitForInputIdle(long long long) +@ stdcall -syscall NtUserWaitForInputIdle(long long long) @ stub NtUserWaitForMsgAndEvent @ stub NtUserWaitForRedirectionStartComplete @ stub NtUserWaitMessage diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 74fb4f4b088..85a98a82904 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -261,9 +261,6 @@ struct unix_funcs UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk ); - BOOL (WINAPI *pNtUserPeekMessage)( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags ); - BOOL (WINAPI *pNtUserPostMessage)( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ); - BOOL (WINAPI *pNtUserPostThreadMessage)( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam ); BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, @@ -316,7 +313,6 @@ struct unix_funcs WCHAR *str, int size, UINT flags, HKL layout ); BOOL (WINAPI *pNtUserTrackMouseEvent)( TRACKMOUSEEVENT *info ); INT (WINAPI *pNtUserTranslateAccelerator)( HWND hwnd, HACCEL accel, MSG *msg ); - BOOL (WINAPI *pNtUserTranslateMessage)( const MSG *msg, UINT flags ); BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance, struct client_menu_name *client_menu_name ); BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id ); @@ -325,7 +321,6 @@ struct unix_funcs COLORREF key, const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty ); WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout ); - DWORD (WINAPI *pNtUserWaitForInputIdle)( HANDLE process, DWORD timeout, BOOL wow ); HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
/* Wine-specific functions */ diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index ed7b24a1f5f..aca64087aff 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -1103,24 +1103,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk ) return unix_funcs->pNtUserOpenClipboard( hwnd, unk ); }
-BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserPeekMessage( msg_out, hwnd, first, last, flags ); -} - -BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserPostMessage( hwnd, msg, wparam, lparam ); -} - -BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserPostThreadMessage( thread, msg, wparam, lparam ); -} - BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) { if (!unix_funcs) return FALSE; @@ -1381,12 +1363,6 @@ INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg ) return unix_funcs->pNtUserTranslateAccelerator( hwnd, accel, msg ); }
-BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserTranslateMessage( msg, flags ); -} - BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance, struct client_menu_name *client_menu_name ) { @@ -1415,12 +1391,6 @@ WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout ) return unix_funcs->pNtUserVkKeyScanEx( chr, layout ); }
-DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserWaitForInputIdle( process, timeout, wow ); -} - HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y ) { if (!unix_funcs) return 0; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 2955b4105d6..f8e35bdeb32 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -157,6 +157,9 @@ SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenWindowStation ) \ + SYSCALL_ENTRY( NtUserPeekMessage ) \ + SYSCALL_ENTRY( NtUserPostMessage ) \ + SYSCALL_ENTRY( NtUserPostThreadMessage ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \ SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \ SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \ @@ -177,9 +180,11 @@ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \ + SYSCALL_ENTRY( NtUserTranslateMessage ) \ SYSCALL_ENTRY( NtUserUnhookWinEvent ) \ SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \ SYSCALL_ENTRY( NtUserUpdateInputContext ) \ + SYSCALL_ENTRY( NtUserWaitForInputIdle ) \ SYSCALL_ENTRY( NtUserWindowFromDC )
#endif /* __WOW64WIN_SYSCALL_H */ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index b0a7f93df41..928a5bb5b18 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -927,6 +927,40 @@ NTSTATUS WINAPI wow64_NtUserOpenWindowStation( UINT *args ) return HandleToUlong( NtUserOpenWindowStation( objattr_32to64( &attr, attr32 ), access )); }
+NTSTATUS WINAPI wow64_NtUserPeekMessage( UINT *args ) +{ + MSG32 *msg32 = get_ptr( &args ); + HWND hwnd = get_handle( &args ); + UINT first = get_ulong( &args ); + UINT last = get_ulong( &args ); + UINT flags = get_ulong( &args ); + MSG msg; + + if (!NtUserPeekMessage( &msg, hwnd, first, last, flags )) return FALSE; + msg_64to32( &msg, msg32 ); + return TRUE; +} + +NTSTATUS WINAPI wow64_NtUserPostMessage( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + UINT msg = get_ulong( &args ); + WPARAM wparam = get_ulong( &args ); + LPARAM lparam = get_ulong( &args ); + + return NtUserPostMessage( hwnd, msg, wparam, lparam ); +} + +NTSTATUS WINAPI wow64_NtUserPostThreadMessage( UINT *args ) +{ + DWORD thread = get_ulong( &args ); + UINT msg = get_ulong( &args ); + WPARAM wparam = get_ulong( &args ); + LPARAM lparam = get_ulong( &args ); + + return NtUserPostThreadMessage( thread, msg, wparam, lparam ); +} + NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args ) { HIMC handle = get_handle( &args ); @@ -1190,6 +1224,15 @@ NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args ) return NtUserTrackPopupMenuEx( handle, flags, x, y, hwnd, params ); }
+NTSTATUS WINAPI wow64_NtUserTranslateMessage( UINT *args ) +{ + const MSG32 *msg32 = get_ptr( &args ); + UINT flags = get_ulong( &args ); + MSG msg; + + return NtUserTranslateMessage( msg_32to64( &msg, msg32 ), flags ); +} + NTSTATUS WINAPI wow64_NtUserUnhookWinEvent( UINT *args ) { HWINEVENTHOOK handle = get_handle( &args ); @@ -1213,6 +1256,15 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args ) return NtUserUpdateInputContext( handle, attr, value ); }
+NTSTATUS WINAPI wow64_NtUserWaitForInputIdle( UINT *args ) +{ + HANDLE process = get_handle( &args ); + DWORD timeout = get_ulong( &args ); + BOOL wow = get_ulong( &args ); + + return NtUserWaitForInputIdle( process, timeout, wow ); +} + NTSTATUS WINAPI wow64_NtUserWindowFromDC( UINT *args ) { HDC hdc = get_handle( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/winex11.drv/dllmain.c | 6 ++---- dlls/winex11.drv/unixlib.h | 6 ++---- dlls/winex11.drv/x11drv_main.c | 10 ---------- 3 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index 086a32d2f85..99a137f66e7 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -23,8 +23,7 @@
HMODULE x11drv_module = 0; -static unixlib_handle_t x11drv_handle; -NTSTATUS (CDECL *x11drv_unix_call)( enum x11drv_funcs code, void *params ); +unixlib_handle_t x11drv_handle;
typedef NTSTATUS (*callback_func)( UINT arg ); @@ -78,13 +77,12 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) &x11drv_handle, sizeof(x11drv_handle), NULL )) return FALSE;
- if (__wine_unix_call( x11drv_handle, unix_init, ¶ms )) return FALSE; + if (X11DRV_CALL( init, ¶ms )) return FALSE;
callback_table = NtCurrentTeb()->Peb->KernelCallbackTable; memcpy( callback_table + NtUserDriverCallbackFirst, kernel_callbacks, sizeof(kernel_callbacks) );
show_systray = params.show_systray; - x11drv_unix_call = params.unix_call; return TRUE; }
diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 208c395e02b..fa3685af33a 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -36,9 +36,8 @@ enum x11drv_funcs unix_funcs_count, };
-/* FIXME: Use __wine_unix_call when the rest of the stack is ready */ -extern NTSTATUS (CDECL *x11drv_unix_call)( enum x11drv_funcs code, void *params ) DECLSPEC_HIDDEN; -#define X11DRV_CALL(func, params) x11drv_unix_call( unix_ ## func, params ) +extern unixlib_handle_t x11drv_handle DECLSPEC_HIDDEN; +#define X11DRV_CALL(func, params) __wine_unix_call( x11drv_handle, unix_ ## func, params )
/* x11drv_create_desktop params */ struct create_desktop_params @@ -52,7 +51,6 @@ struct init_params { WNDPROC foreign_window_proc; BOOL show_systray; - NTSTATUS (CDECL *unix_call)( enum x11drv_funcs code, void *params ); };
struct systray_dock_params diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 9e05ebaa9a5..20e07679635 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -220,8 +220,6 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "text/uri-list" };
-static NTSTATUS CDECL unix_call( enum x11drv_funcs code, void *params ); - /*********************************************************************** * ignore_error * @@ -717,7 +715,6 @@ static NTSTATUS x11drv_init( void *arg ) init_user_driver(); X11DRV_DisplayDevices_Init(FALSE); params->show_systray = show_systray; - params->unix_call = unix_call; return STATUS_SUCCESS; }
@@ -1340,10 +1337,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); - - -/* FIXME: Use __wine_unix_call instead */ -static NTSTATUS CDECL unix_call( enum x11drv_funcs code, void *params ) -{ - return __wine_unix_call_funcs[code]( params ); -}
From: Jacek Caban jacek@codeweavers.com
--- dlls/wineandroid.drv/dllmain.c | 4 +--- dlls/wineandroid.drv/init.c | 10 ---------- dlls/wineandroid.drv/unixlib.h | 4 +--- 3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/dlls/wineandroid.drv/dllmain.c b/dlls/wineandroid.drv/dllmain.c index 6556a492505..b10491a22d8 100644 --- a/dlls/wineandroid.drv/dllmain.c +++ b/dlls/wineandroid.drv/dllmain.c @@ -33,7 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(android);
static unixlib_handle_t unix_handle; -static NTSTATUS (CDECL *unix_call)( enum android_funcs code, void *params );
extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ); static HANDLE stop_event; @@ -130,12 +129,11 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return FALSE;
params.register_window_callback = register_window_callback; - if (__wine_unix_call( unix_handle, unix_init, ¶ms )) return FALSE; + if (ANDROID_CALL( init, ¶ms )) return FALSE;
callback_table = NtCurrentTeb()->Peb->KernelCallbackTable; callback_table[client_start_device] = android_start_device;
- unix_call = params.unix_call; return TRUE; }
diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index 83fe224dccf..cf97b25fbb7 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -562,8 +562,6 @@ JavaVM **p_java_vm = NULL; jobject *p_java_object = NULL; unsigned short *p_java_gdt_sel = NULL;
-static NTSTATUS CDECL unix_call( enum android_funcs code, void *params ); - static HRESULT android_init( void *arg ) { struct init_params *params = arg; @@ -609,7 +607,6 @@ static HRESULT android_init( void *arg ) #endif } __wine_set_user_driver( &android_drv_funcs, WINE_GDI_DRIVER_VERSION ); - params->unix_call = unix_call; return STATUS_SUCCESS; }
@@ -625,10 +622,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); - - -/* FIXME: Use __wine_unix_call instead */ -static NTSTATUS CDECL unix_call( enum android_funcs code, void *params ) -{ - return __wine_unix_call_funcs[code]( params ); -} diff --git a/dlls/wineandroid.drv/unixlib.h b/dlls/wineandroid.drv/unixlib.h index 2b4d02648e5..98da6528fd5 100644 --- a/dlls/wineandroid.drv/unixlib.h +++ b/dlls/wineandroid.drv/unixlib.h @@ -30,14 +30,12 @@ enum android_funcs unix_funcs_count };
-/* FIXME: Use __wine_unix_call when the rest of the stack is ready */ -#define ANDROID_CALL(func, params) unix_call( unix_ ## func, params ) +#define ANDROID_CALL(func, params) __wine_unix_call( unix_handle, unix_ ## func, params )
/* android_init params */ struct init_params { PNTAPCFUNC register_window_callback; - NTSTATUS (CDECL *unix_call)( enum android_funcs code, void *params ); };
From: Jacek Caban jacek@codeweavers.com
--- dlls/winemac.drv/dllmain.c | 7 ++----- dlls/winemac.drv/macdrv_main.c | 12 ------------ dlls/winemac.drv/unixlib.h | 6 ++---- 3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c index 567485b2f03..ac03ec360ce 100644 --- a/dlls/winemac.drv/dllmain.c +++ b/dlls/winemac.drv/dllmain.c @@ -27,8 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
HMODULE macdrv_module = 0; -static unixlib_handle_t macdrv_handle; -NTSTATUS (CDECL *macdrv_unix_call)(enum macdrv_funcs code, void *params); +unixlib_handle_t macdrv_handle;
struct quit_info { HWND *wins; @@ -414,12 +413,10 @@ static BOOL process_attach(void) str->len = LoadStringW(macdrv_module, str->id, (WCHAR *)&str->str, 0); params.strings = strings;
- if (__wine_unix_call(macdrv_handle, unix_init, ¶ms)) return FALSE; + if (MACDRV_CALL(init, ¶ms)) return FALSE;
callback_table = NtCurrentTeb()->Peb->KernelCallbackTable; memcpy( callback_table + NtUserDriverCallbackFirst, kernel_callbacks, sizeof(kernel_callbacks) ); - - macdrv_unix_call = params.unix_call; return TRUE; }
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 4b79c69a6f8..7cca25cf302 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -429,9 +429,6 @@ static void load_strings(struct localized_string *str) }
-static NTSTATUS CDECL unix_call( enum macdrv_funcs code, void *params ); - - /*********************************************************************** * macdrv_init */ @@ -458,8 +455,6 @@ static NTSTATUS macdrv_init(void *arg)
init_user_driver(); macdrv_init_display_devices(FALSE); - - params->unix_call = unix_call; return STATUS_SUCCESS; }
@@ -658,10 +653,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] = };
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); - - -/* FIXME: Use __wine_unix_call instead */ -static NTSTATUS CDECL unix_call(enum macdrv_funcs code, void *params) -{ - return __wine_unix_call_funcs[code]( params ); -} diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index d162732b08e..c5e71e188fa 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -35,9 +35,8 @@ enum macdrv_funcs unix_funcs_count };
-/* FIXME: Use __wine_unix_call when the rest of the stack is ready */ -extern NTSTATUS (CDECL *macdrv_unix_call)(enum macdrv_funcs code, void *params) DECLSPEC_HIDDEN; -#define MACDRV_CALL(func, params) macdrv_unix_call(unix_ ## func, params) +extern unixlib_handle_t macdrv_handle DECLSPEC_HIDDEN; +#define MACDRV_CALL(func, params) __wine_unix_call(macdrv_handle, unix_ ## func, params)
/* macdrv_dnd_get_data params */ struct dnd_get_data_params @@ -84,7 +83,6 @@ struct localized_string struct init_params { struct localized_string *strings; - NTSTATUS (CDECL *unix_call)(enum macdrv_funcs code, void *params); };
/* macdrv_notify_icon params */
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 13 --- dlls/win32u/syscall.c | 13 +++ dlls/win32u/win32u.spec | 28 ++--- dlls/win32u/win32u_private.h | 14 --- dlls/win32u/wrappers.c | 79 -------------- dlls/wow64win/syscall.h | 13 +++ dlls/wow64win/user.c | 200 +++++++++++++++++++++++++++++++++++ 7 files changed, 240 insertions(+), 120 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 08852856a95..621c2855553 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,7 +1136,6 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserActivateKeyboardLayout, NtUserBeginPaint, NtUserCallHwnd, NtUserCallHwndParam, @@ -1170,18 +1169,13 @@ static struct unix_funcs unix_funcs = NtUserEnumDisplaySettings, NtUserExcludeUpdateRgn, NtUserFlashWindowEx, - NtUserGetAsyncKeyState, NtUserGetClassInfoEx, NtUserGetClipboardData, - NtUserGetCursorInfo, NtUserGetDCEx, NtUserGetDisplayConfigBufferSizes, NtUserGetIconInfo, - NtUserGetKeyNameText, - NtUserGetKeyboardLayoutList, NtUserGetMenuBarInfo, NtUserGetPriorityClipboardFormat, - NtUserGetQueueStatus, NtUserGetScrollBarInfo, NtUserGetSystemMenu, NtUserGetUpdateRect, @@ -1194,17 +1188,14 @@ static struct unix_funcs unix_funcs = NtUserInvalidateRect, NtUserInvalidateRgn, NtUserIsClipboardFormatAvailable, - NtUserMapVirtualKeyEx, NtUserMoveWindow, NtUserOpenClipboard, NtUserRedrawWindow, NtUserRegisterClassExWOW, - NtUserRegisterHotKey, NtUserReleaseDC, NtUserScrollDC, NtUserScrollWindowEx, NtUserSelectPalette, - NtUserSendInput, NtUserSetActiveWindow, NtUserSetCapture, NtUserSetClipboardData, @@ -1214,7 +1205,6 @@ static struct unix_funcs unix_funcs = NtUserSetClipboardViewer, NtUserSetCursor, NtUserSetCursorIconData, - NtUserSetCursorPos, NtUserSetFocus, NtUserSetInternalWindowPos, NtUserSetLayeredWindowAttributes, @@ -1236,13 +1226,10 @@ static struct unix_funcs unix_funcs = NtUserShowWindowAsync, NtUserSystemParametersInfo, NtUserSystemParametersInfoForDpi, - NtUserToUnicodeEx, NtUserTrackMouseEvent, NtUserTranslateAccelerator, NtUserUnregisterClass, - NtUserUnregisterHotKey, NtUserUpdateLayeredWindow, - NtUserVkKeyScanEx, NtUserWindowFromPoint,
SetDIBits, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index f5ede759090..2d9b8a29499 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -100,6 +100,7 @@ static void * const syscalls[] = NtGdiSetVirtualResolution, NtGdiSwapBuffers, NtGdiTransformPoints, + NtUserActivateKeyboardLayout, NtUserAddClipboardFormatListener, NtUserAssociateInputContext, NtUserAttachThreadInput, @@ -122,6 +123,7 @@ static void * const syscalls[] = NtUserFindExistingCursorIcon, NtUserFindWindowEx, NtUserGetAncestor, + NtUserGetAsyncKeyState, NtUserGetAtomName, NtUserGetCaretBlinkTime, NtUserGetCaretPos, @@ -132,13 +134,16 @@ static void * const syscalls[] = NtUserGetClipboardViewer, NtUserGetCursor, NtUserGetCursorFrameInfo, + NtUserGetCursorInfo, NtUserGetDoubleClickTime, NtUserGetDpiForMonitor, NtUserGetForegroundWindow, NtUserGetGUIThreadInfo, NtUserGetIconSize, + NtUserGetKeyNameText, NtUserGetKeyState, NtUserGetKeyboardLayout, + NtUserGetKeyboardLayoutList, NtUserGetKeyboardLayoutName, NtUserGetKeyboardState, NtUserGetLayeredWindowAttributes, @@ -150,6 +155,7 @@ static void * const syscalls[] = NtUserGetProcessDpiAwarenessContext, NtUserGetProcessWindowStation, NtUserGetProp, + NtUserGetQueueStatus, NtUserGetRawInputBuffer, NtUserGetRawInputData, NtUserGetRawInputDeviceInfo, @@ -163,6 +169,7 @@ static void * const syscalls[] = NtUserInternalGetWindowText, NtUserKillTimer, NtUserLockWindowUpdate, + NtUserMapVirtualKeyEx, NtUserMenuItemFromPoint, NtUserMessageCall, NtUserMsgWaitForMultipleObjectsEx, @@ -174,10 +181,13 @@ static void * const syscalls[] = NtUserPostMessage, NtUserPostThreadMessage, NtUserQueryInputContext, + NtUserRegisterHotKey, NtUserRegisterRawInputDevices, NtUserRemoveClipboardFormatListener, NtUserRemoveMenu, NtUserRemoveProp, + NtUserSendInput, + NtUserSetCursorPos, NtUserSetKeyboardState, NtUserSetMenuContextHelpId, NtUserSetMenuDefaultItem, @@ -192,11 +202,14 @@ static void * const syscalls[] = NtUserSetWindowsHookEx, NtUserThunkedMenuInfo, NtUserThunkedMenuItemInfo, + NtUserToUnicodeEx, NtUserTrackPopupMenuEx, NtUserTranslateMessage, NtUserUnhookWinEvent, NtUserUnhookWindowsHookEx, + NtUserUnregisterHotKey, NtUserUpdateInputContext, + NtUserVkKeyScanEx, NtUserWaitForInputIdle, NtUserWindowFromDC, }; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 3e04342a645..49cb00ae413 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -749,7 +749,7 @@ @ stub NtUpdateInputSinkTransforms @ stub NtUserAcquireIAMKey @ stub NtUserAcquireInteractiveControlBackgroundAccess -@ stdcall NtUserActivateKeyboardLayout(long long) +@ stdcall -syscall NtUserActivateKeyboardLayout(long long) @ stdcall -syscall NtUserAddClipboardFormatListener(long) @ stub NtUserAddVisualIdentifier @ stub NtUserAlterWindowStyle @@ -891,7 +891,7 @@ @ stub NtUserGetAltTabInfo @ stdcall -syscall NtUserGetAncestor(long long) @ stub NtUserGetAppImeLevel -@ stdcall NtUserGetAsyncKeyState(long) +@ stdcall -syscall NtUserGetAsyncKeyState(long) @ stdcall -syscall NtUserGetAtomName(long ptr) @ stub NtUserGetAutoRotationState @ stub NtUserGetCIMSSM @@ -914,7 +914,7 @@ @ stub NtUserGetCurrentInputMessageSource @ stdcall -syscall NtUserGetCursor() @ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr) -@ stdcall NtUserGetCursorInfo(ptr) +@ stdcall -syscall NtUserGetCursorInfo(ptr) @ stub NtUserGetDC @ stdcall NtUserGetDCEx(long long long) @ stub NtUserGetDManipHookInitFunction @@ -944,10 +944,10 @@ @ stub NtUserGetInteractiveControlInfo @ stub NtUserGetInteractiveCtrlSupportedWaveforms @ stub NtUserGetInternalWindowPos -@ stdcall NtUserGetKeyNameText(long ptr long) +@ stdcall -syscall NtUserGetKeyNameText(long ptr long) @ stdcall -syscall NtUserGetKeyState(long) @ stdcall -syscall NtUserGetKeyboardLayout(long) -@ stdcall NtUserGetKeyboardLayoutList(long ptr) +@ stdcall -syscall NtUserGetKeyboardLayoutList(long ptr) @ stdcall -syscall NtUserGetKeyboardLayoutName(ptr) @ stdcall -syscall NtUserGetKeyboardState(ptr) @ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr) @@ -981,7 +981,7 @@ @ stub NtUserGetProcessUIContextInformation @ stdcall -syscall NtUserGetProcessWindowStation() @ stdcall -syscall NtUserGetProp(long wstr) -@ stdcall NtUserGetQueueStatus(long) +@ stdcall -syscall NtUserGetQueueStatus(long) @ stub NtUserGetQueueStatusReadonly @ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long) @ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long) @@ -1076,7 +1076,7 @@ @ stub NtUserMagGetContextInformation @ stub NtUserMagSetContextInformation @ stub NtUserMapPointsByVisualIdentifier -@ stdcall NtUserMapVirtualKeyEx(long long long) +@ stdcall -syscall NtUserMapVirtualKeyEx(long long long) @ stub NtUserMarkWindowForRawMouse @ stdcall -syscall NtUserMenuItemFromPoint(long long long long) @ stdcall -syscall NtUserMessageCall(long long long long long long long) @@ -1126,7 +1126,7 @@ @ stub NtUserRegisterDManipHook @ stub NtUserRegisterEdgy @ stub NtUserRegisterErrorReportingDialog -@ stdcall NtUserRegisterHotKey(long long long long) +@ stdcall -syscall NtUserRegisterHotKey(long long long long) @ stub NtUserRegisterManipulationThread @ stub NtUserRegisterPointerDeviceNotifications @ stub NtUserRegisterPointerInputTarget @@ -1159,8 +1159,8 @@ @ stdcall NtUserScrollWindowEx(long long long ptr ptr long ptr long) @ stdcall NtUserSelectPalette(long long long) @ stub NtUserSendEventMessage -@ stdcall NtUserSendInput(long ptr long) -@ stub NtUserSendInteractiveControlHapticsReport +@ stdcall -syscall NtUserSendInput(long ptr long) +@ stub NtUserSendInteracsetiveControlHapticsReport @ stub NtUserSetActivationFilter @ stub NtUserSetActiveProcessForMonitor @ stdcall NtUserSetActiveWindow(long) @@ -1181,7 +1181,7 @@ @ stdcall NtUserSetCursor(long) @ stub NtUserSetCursorContents @ stdcall NtUserSetCursorIconData(long ptr ptr ptr) -@ stdcall NtUserSetCursorPos(long long) +@ stdcall -syscall NtUserSetCursorPos(long long) @ stub NtUserSetDesktopColorTransform @ stub NtUserSetDesktopVisualInputSink @ stub NtUserSetDialogControlDpiChangeBehavior @@ -1276,7 +1276,7 @@ @ stub NtUserTestForInteractiveUser @ stdcall -syscall NtUserThunkedMenuInfo(long ptr) @ stdcall -syscall NtUserThunkedMenuItemInfo(long long long long ptr ptr) -@ stdcall NtUserToUnicodeEx(long long ptr ptr long long long) +@ stdcall -syscall NtUserToUnicodeEx(long long ptr ptr long long long) @ stdcall NtUserTrackMouseEvent(ptr) @ stdcall -syscall NtUserTrackPopupMenuEx(long long long long long ptr) @ stub NtUserTransformPoint @@ -1289,7 +1289,7 @@ @ stub NtUserUnloadKeyboardLayout @ stub NtUserUnlockWindowStation @ stdcall NtUserUnregisterClass(ptr ptr ptr) -@ stdcall NtUserUnregisterHotKey(long long) +@ stdcall -syscall NtUserUnregisterHotKey(long long) @ stub NtUserUnregisterSessionPort @ stub NtUserUnregisterUserApiHook @ stub NtUserUpdateDefaultDesktopThumbnail @@ -1302,7 +1302,7 @@ @ stub NtUserUserHandleGrantAccess @ stub NtUserValidateRect @ stub NtUserValidateTimerCallback -@ stdcall NtUserVkKeyScanEx(long long) +@ stdcall -syscall NtUserVkKeyScanEx(long long) @ stub NtUserWOWCleanup @ stub NtUserWaitAvailableMessageEx @ stdcall -syscall NtUserWaitForInputIdle(long long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 85a98a82904..273be5da567 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,7 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - HKL (WINAPI *pNtUserActivateKeyboardLayout)( HKL layout, UINT flags ); HDC (WINAPI *pNtUserBeginPaint)( HWND hwnd, PAINTSTRUCT *ps ); ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code ); ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code ); @@ -231,21 +230,16 @@ struct unix_funcs DEVMODEW *dev_mode, DWORD flags ); INT (WINAPI *pNtUserExcludeUpdateRgn)( HDC hdc, HWND hwnd ); BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info ); - SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key ); ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ); HANDLE (WINAPI *pNtUserGetClipboardData)( UINT format, struct get_clipboard_params *params ); - BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info ); HDC (WINAPI *pNtUserGetDCEx)( HWND hwnd, HRGN clip_rgn, DWORD flags ); LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info, UINT32 *num_mode_info ); BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module, UNICODE_STRING *res_name, DWORD *bpp, LONG unk ); - 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 ); INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); - DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags ); BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info ); HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert ); BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase ); @@ -258,7 +252,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserInvalidateRect)( HWND hwnd, const RECT *rect, BOOL erase ); BOOL (WINAPI *pNtUserInvalidateRgn)( HWND hwnd, HRGN hrgn, BOOL erase ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); - UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk ); BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); @@ -266,7 +259,6 @@ struct unix_funcs UNICODE_STRING *version, struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags, DWORD *wow ); - BOOL (WINAPI *pNtUserRegisterHotKey)( HWND hwnd, INT id, UINT modifiers, UINT vk ); INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc ); BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip, HRGN ret_update_rgn, RECT *update_rect ); @@ -274,7 +266,6 @@ struct unix_funcs const RECT *clip_rect, HRGN update_rgn, RECT *update_rect, UINT flags ); HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg ); - UINT (WINAPI *pNtUserSendInput)( UINT count, INPUT *inputs, int size ); HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd ); HWND (WINAPI *pNtUserSetCapture)( HWND hwnd ); NTSTATUS (WINAPI *pNtUserSetClipboardData)( UINT format, HANDLE handle, @@ -286,7 +277,6 @@ struct unix_funcs HCURSOR (WINAPI *pNtUserSetCursor)( HCURSOR cursor ); BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name, struct cursoricon_desc *desc ); - BOOL (WINAPI *pNtUserSetCursorPos)( INT x, INT y ); HWND (WINAPI *pNtUserSetFocus)( HWND hwnd ); void (WINAPI *pNtUserSetInternalWindowPos)( HWND hwnd, UINT cmd, RECT *rect, POINT *pt ); BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ); @@ -309,18 +299,14 @@ struct unix_funcs BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini ); BOOL (WINAPI *pNtUserSystemParametersInfoForDpi)( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi ); - INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state, - WCHAR *str, int size, UINT flags, HKL layout ); BOOL (WINAPI *pNtUserTrackMouseEvent)( TRACKMOUSEEVENT *info ); INT (WINAPI *pNtUserTranslateAccelerator)( HWND hwnd, HACCEL accel, MSG *msg ); BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance, struct client_menu_name *client_menu_name ); - BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id ); BOOL (WINAPI *pNtUserUpdateLayeredWindow)( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size, HDC hdc_src, const POINT *pts_src, COLORREF key, const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty ); - WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout ); HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
/* Wine-specific functions */ diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index aca64087aff..3289d70010b 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserActivateKeyboardLayout( layout, flags ); -} - HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps ) { if (!unix_funcs) return 0; @@ -937,12 +931,6 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) return unix_funcs->pNtUserFlashWindowEx( info ); }
-SHORT WINAPI NtUserGetAsyncKeyState( INT key ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetAsyncKeyState( key ); -} - ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ) { @@ -956,12 +944,6 @@ HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params * return unix_funcs->pNtUserGetClipboardData( format, params ); }
-BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserGetCursorInfo( info ); -} - HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags ) { if (!unix_funcs) return 0; @@ -982,18 +964,6 @@ BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *modul return unix_funcs->pNtUserGetIconInfo( icon, info, module, res_name, bpp, unk ); }
-UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetKeyboardLayoutList( size, layouts ); -} - -INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetKeyNameText( lparam, buffer, size ); -} - BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info ) { if (!unix_funcs) return 0; @@ -1042,12 +1012,6 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count ); }
-DWORD WINAPI NtUserGetQueueStatus( UINT flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetQueueStatus( flags ); -} - BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info ) { if (!unix_funcs) return FALSE; @@ -1091,12 +1055,6 @@ BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) return unix_funcs->pNtUserIsClipboardFormatAvailable( format ); }
-UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout ) -{ - if (!unix_funcs) return -1; - return unix_funcs->pNtUserMapVirtualKeyEx( code, type, layout ); -} - BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk ) { if (!unix_funcs) return FALSE; @@ -1117,12 +1075,6 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam return unix_funcs->pNtUserRegisterClassExWOW( wc, name, version, client_menu_name, fnid, flags, wow ); }
-BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserRegisterHotKey( hwnd, id, modifiers, vk ); -} - INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc ) { if (!unix_funcs) return 0; @@ -1151,12 +1103,6 @@ HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg ) return unix_funcs->pNtUserSelectPalette( hdc, hpal, bkg ); }
-UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSendInput( count, inputs, size ); -} - HWND WINAPI NtUserSetActiveWindow( HWND hwnd ) { if (!unix_funcs) return 0; @@ -1212,12 +1158,6 @@ BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNI return unix_funcs->pNtUserSetCursorIconData( cursor, module, res_name, desc ); }
-BOOL WINAPI NtUserSetCursorPos( INT x, INT y ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserSetCursorPos( x, y ); -} - HWND WINAPI NtUserSetFocus( HWND hwnd ) { if (!unix_funcs) return FALSE; @@ -1344,13 +1284,6 @@ BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, return unix_funcs->pNtUserSystemParametersInfoForDpi( action, val, ptr, winini, dpi ); }
-INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state, - WCHAR *str, int size, UINT flags, HKL layout ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserToUnicodeEx( virt, scan, state, str, size, flags, layout ); -} - BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info ) { if (!unix_funcs) return FALSE; @@ -1370,12 +1303,6 @@ BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance, return unix_funcs->pNtUserUnregisterClass( name, instance, client_menu_name ); }
-BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserUnregisterHotKey( hwnd, id ); -} - BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size, HDC hdc_src, const POINT *pts_src, COLORREF key, const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty ) @@ -1385,12 +1312,6 @@ BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_ key, blend, flags, dirty ); }
-WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserVkKeyScanEx( chr, layout ); -} - HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y ) { if (!unix_funcs) return 0; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index f8e35bdeb32..fff01036c6c 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -87,6 +87,7 @@ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \ + SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \ SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserAssociateInputContext ) \ SYSCALL_ENTRY( NtUserAttachThreadInput ) \ @@ -109,6 +110,7 @@ SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \ SYSCALL_ENTRY( NtUserFindWindowEx ) \ SYSCALL_ENTRY( NtUserGetAncestor ) \ + SYSCALL_ENTRY( NtUserGetAsyncKeyState ) \ SYSCALL_ENTRY( NtUserGetAtomName ) \ SYSCALL_ENTRY( NtUserGetCaretBlinkTime ) \ SYSCALL_ENTRY( NtUserGetCaretPos ) \ @@ -119,13 +121,16 @@ SYSCALL_ENTRY( NtUserGetClipboardViewer ) \ SYSCALL_ENTRY( NtUserGetCursor ) \ SYSCALL_ENTRY( NtUserGetCursorFrameInfo ) \ + SYSCALL_ENTRY( NtUserGetCursorInfo ) \ SYSCALL_ENTRY( NtUserGetDoubleClickTime ) \ SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \ SYSCALL_ENTRY( NtUserGetForegroundWindow ) \ SYSCALL_ENTRY( NtUserGetGUIThreadInfo ) \ SYSCALL_ENTRY( NtUserGetIconSize ) \ + SYSCALL_ENTRY( NtUserGetKeyNameText ) \ SYSCALL_ENTRY( NtUserGetKeyState ) \ SYSCALL_ENTRY( NtUserGetKeyboardLayout ) \ + SYSCALL_ENTRY( NtUserGetKeyboardLayoutList ) \ SYSCALL_ENTRY( NtUserGetKeyboardLayoutName ) \ SYSCALL_ENTRY( NtUserGetKeyboardState ) \ SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \ @@ -137,6 +142,7 @@ SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetProp ) \ + SYSCALL_ENTRY( NtUserGetQueueStatus ) \ SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \ SYSCALL_ENTRY( NtUserGetRawInputData ) \ SYSCALL_ENTRY( NtUserGetRawInputDeviceInfo ) \ @@ -150,6 +156,7 @@ SYSCALL_ENTRY( NtUserInternalGetWindowText ) \ SYSCALL_ENTRY( NtUserKillTimer ) \ SYSCALL_ENTRY( NtUserLockWindowUpdate ) \ + SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \ SYSCALL_ENTRY( NtUserMenuItemFromPoint ) \ SYSCALL_ENTRY( NtUserMessageCall ) \ SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \ @@ -161,10 +168,13 @@ SYSCALL_ENTRY( NtUserPostMessage ) \ SYSCALL_ENTRY( NtUserPostThreadMessage ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \ + SYSCALL_ENTRY( NtUserRegisterHotKey ) \ SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \ SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserRemoveMenu ) \ SYSCALL_ENTRY( NtUserRemoveProp ) \ + SYSCALL_ENTRY( NtUserSendInput ) \ + SYSCALL_ENTRY( NtUserSetCursorPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ SYSCALL_ENTRY( NtUserSetMenuDefaultItem ) \ @@ -179,11 +189,14 @@ SYSCALL_ENTRY( NtUserSetWindowsHookEx ) \ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ + SYSCALL_ENTRY( NtUserToUnicodeEx ) \ SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \ SYSCALL_ENTRY( NtUserTranslateMessage ) \ SYSCALL_ENTRY( NtUserUnhookWinEvent ) \ SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \ + SYSCALL_ENTRY( NtUserUnregisterHotKey ) \ SYSCALL_ENTRY( NtUserUpdateInputContext ) \ + SYSCALL_ENTRY( NtUserVkKeyScanEx ) \ SYSCALL_ENTRY( NtUserWaitForInputIdle ) \ SYSCALL_ENTRY( NtUserWindowFromDC )
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 928a5bb5b18..53fdaa6db63 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -78,6 +78,36 @@ typedef struct DWORD dwType; } RAWINPUTDEVICELIST32;
+typedef struct +{ + LONG dx; + LONG dy; + DWORD mouseData; + DWORD dwFlags; + DWORD time; + ULONG dwExtraInfo; +} MOUSEINPUT32; + +typedef struct +{ + WORD wVk; + WORD wScan; + DWORD dwFlags; + DWORD time; + ULONG dwExtraInfo; +} KEYBDINPUT32; + +typedef struct +{ + DWORD type; + union + { + MOUSEINPUT32 mi; + KEYBDINPUT32 ki; + HARDWAREINPUT hi; + } DUMMYUNIONNAME; +} INPUT32; + static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 ) { if (!msg32) return NULL; @@ -104,6 +134,14 @@ static MSG32 *msg_64to32( MSG *msg, MSG32 *msg32 ) return msg32; }
+NTSTATUS WINAPI wow64_NtUserActivateKeyboardLayout( UINT *args ) +{ + HKL layout = get_handle( &args ); + UINT flags = get_ulong( &args );; + + return HandleToUlong( NtUserActivateKeyboardLayout( layout, flags )); +} + NTSTATUS WINAPI wow64_NtUserAddClipboardFormatListener( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -333,6 +371,13 @@ NTSTATUS WINAPI wow64_NtUserGetAncestor( UINT *args ) return HandleToUlong( NtUserGetAncestor( hwnd, type )); }
+NTSTATUS WINAPI wow64_NtUserGetAsyncKeyState( UINT *args ) +{ + INT key = get_ulong( &args ); + + return NtUserGetAsyncKeyState( key ); +} + NTSTATUS WINAPI wow64_NtUserGetAtomName( UINT *args ) { ATOM atom = get_ulong( &args ); @@ -405,6 +450,26 @@ NTSTATUS WINAPI wow64_NtUserGetCursorFrameInfo( UINT *args ) return HandleToUlong( NtUserGetCursorFrameInfo( cursor, istep, rate_jiffies, num_steps )); }
+NTSTATUS WINAPI wow64_NtUserGetCursorInfo( UINT *args ) +{ + struct + { + DWORD cbSize; + DWORD flags; + ULONG hCursor; + POINT ptScreenPos; + } *info32 = get_ptr( &args ); + CURSORINFO info; + + if (!info32) return FALSE; + info.cbSize = sizeof(info); + if (!NtUserGetCursorInfo( &info )) return FALSE; + info32->flags = info.flags; + info32->hCursor = HandleToUlong( info.hCursor ); + info32->ptScreenPos = info.ptScreenPos; + return TRUE; +} + NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args ) { return NtUserGetDoubleClickTime(); @@ -471,6 +536,15 @@ NTSTATUS WINAPI wow64_NtUserGetIconSize( UINT *args ) return NtUserGetIconSize( handle, step, width, height ); }
+NTSTATUS WINAPI wow64_NtUserGetKeyNameText( UINT *args ) +{ + LONG lparam = get_ulong( &args ); + WCHAR *buffer = get_ptr( &args ); + INT size = get_ulong( &args ); + + return NtUserGetKeyNameText( lparam, buffer, size ); +} + NTSTATUS WINAPI wow64_NtUserGetKeyState( UINT *args ) { INT vkey = get_ulong( &args ); @@ -485,6 +559,22 @@ NTSTATUS WINAPI wow64_NtUserGetKeyboardLayout( UINT *args ) return HandleToUlong( NtUserGetKeyboardLayout( tid )); }
+NTSTATUS WINAPI wow64_NtUserGetKeyboardLayoutList( UINT *args ) +{ + INT size = get_ulong( &args ); + UINT32 *layouts32 = get_ptr( &args ); + HKL *layouts = NULL; + UINT ret, i; + + if (layouts32 && size && !(layouts = Wow64AllocateTemp( size * sizeof(*layouts) ))) + return 0; + + ret = NtUserGetKeyboardLayoutList( size, layouts ); + if (layouts) + for (i = 0; i < ret; i++) layouts32[i] = HandleToUlong( layouts[i] ); + return ret; +} + NTSTATUS WINAPI wow64_NtUserGetKeyboardLayoutName( UINT *args ) { WCHAR *name = get_ptr( &args ); @@ -579,6 +669,13 @@ NTSTATUS WINAPI wow64_NtUserGetProp( UINT *args ) return HandleToUlong( NtUserGetProp( hwnd, str )); }
+NTSTATUS WINAPI wow64_NtUserGetQueueStatus( UINT *args ) +{ + UINT flags = get_ulong( &args ); + + return NtUserGetQueueStatus( flags ); +} + NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args ) { RAWINPUT *data = get_ptr( &args ); @@ -839,6 +936,15 @@ NTSTATUS WINAPI wow64_NtUserLockWindowUpdate( UINT *args ) return NtUserLockWindowUpdate( hwnd ); }
+NTSTATUS WINAPI wow64_NtUserMapVirtualKeyEx( UINT *args ) +{ + UINT code = get_ulong( &args ); + UINT type = get_ulong( &args ); + HKL layout = get_handle( &args ); + + return NtUserMapVirtualKeyEx( code, type, layout ); +} + NTSTATUS WINAPI wow64_NtUserMenuItemFromPoint( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -969,6 +1075,16 @@ NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args ) return NtUserQueryInputContext( handle, attr ); }
+NTSTATUS WINAPI wow64_NtUserRegisterHotKey( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + INT id = get_ulong( &args ); + UINT modifiers = get_ulong( &args ); + UINT vk = get_ulong( &args ); + + return NtUserRegisterHotKey( hwnd, id, modifiers, vk ); +} + NTSTATUS WINAPI wow64_NtUserRegisterRawInputDevices( UINT *args ) { const RAWINPUTDEVICE32 *devices32 = get_ptr( &args ); @@ -1025,6 +1141,61 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args ) return HandleToUlong( NtUserRemoveProp( hwnd, str )); }
+NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args ) +{ + UINT count = get_ulong( &args ); + INPUT32 *inputs32 = get_ptr( &args ); + int size = get_ulong( &args ); + + INPUT *inputs = NULL; + unsigned int i; + + if (size != sizeof(*inputs32)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return 0; + } + + if (count && !(inputs = Wow64AllocateTemp( count * sizeof(*inputs) ))) + return 0; + + for (i = 0; i < count; i++) + { + inputs[i].type = inputs32[i].type; + switch (inputs[i].type) + { + case INPUT_MOUSE: + inputs[i].mi.dx = inputs32[i].mi.dx; + inputs[i].mi.dy = inputs32[i].mi.dy; + inputs[i].mi.mouseData = inputs32[i].mi.mouseData; + inputs[i].mi.dwFlags = inputs32[i].mi.dwFlags; + inputs[i].mi.time = inputs32[i].mi.time; + inputs[i].mi.dwExtraInfo = inputs32[i].mi.dwExtraInfo; + break; + case INPUT_KEYBOARD: + inputs[i].ki.wVk = inputs32[i].ki.wVk; + inputs[i].ki.wScan = inputs32[i].ki.wScan; + inputs[i].ki.dwFlags = inputs32[i].ki.dwFlags; + inputs[i].ki.time = inputs32[i].ki.time; + inputs[i].ki.dwExtraInfo = inputs32[i].ki.dwExtraInfo; + break; + case INPUT_HARDWARE: + inputs[i].hi = inputs32[i].hi; + break; + } + } + + return NtUserSendInput( count, inputs, sizeof(*inputs) ); +} + +NTSTATUS WINAPI wow64_NtUserSetCursorPos( UINT *args ) +{ + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + + return NtUserSetCursorPos( x, y ); +} + NTSTATUS WINAPI wow64_NtUserSetKeyboardState( UINT *args ) { BYTE *state = get_ptr( &args ); @@ -1212,6 +1383,19 @@ NTSTATUS WINAPI wow64_NtUserThunkedMenuItemInfo( UINT *args ) unicode_str_32to64( &str, str32 )); }
+NTSTATUS WINAPI wow64_NtUserToUnicodeEx( UINT *args ) +{ + UINT virt = get_ulong( &args ); + UINT scan = get_ulong( &args ); + const BYTE *state = get_ptr( &args ); + WCHAR *str = get_ptr( &args ); + int size = get_ulong( &args ); + UINT flags = get_ulong( &args ); + HKL layout = get_handle( &args ); + + return NtUserToUnicodeEx( virt, scan, state, str, size, flags, layout ); +} + NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args ) { HMENU handle = get_handle( &args ); @@ -1247,6 +1431,14 @@ NTSTATUS WINAPI wow64_NtUserUnhookWindowsHookEx( UINT *args ) return NtUserUnhookWindowsHookEx( handle ); }
+NTSTATUS WINAPI wow64_NtUserUnregisterHotKey( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + int id = get_ulong( &args ); + + return NtUserUnregisterHotKey( hwnd, id ); +} + NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args ) { HIMC handle = get_handle( &args ); @@ -1256,6 +1448,14 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args ) return NtUserUpdateInputContext( handle, attr, value ); }
+NTSTATUS WINAPI wow64_NtUserVkKeyScanEx( UINT *args ) +{ + WCHAR chr = get_ulong( &args ); + HKL layout = get_handle( &args ); + + return NtUserVkKeyScanEx( chr, layout ); +} + NTSTATUS WINAPI wow64_NtUserWaitForInputIdle( UINT *args ) { HANDLE process = get_handle( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 8 --- dlls/win32u/syscall.c | 8 +++ dlls/win32u/win32u.spec | 16 +++--- dlls/win32u/win32u_private.h | 10 ---- dlls/win32u/wrappers.c | 51 ------------------- dlls/wow64win/syscall.h | 8 +++ dlls/wow64win/user.c | 97 ++++++++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+), 77 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 621c2855553..5bb8adedf44 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,7 +1136,6 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserBeginPaint, NtUserCallHwnd, NtUserCallHwndParam, NtUserCallNextHookEx, @@ -1171,30 +1170,23 @@ static struct unix_funcs unix_funcs = NtUserFlashWindowEx, NtUserGetClassInfoEx, NtUserGetClipboardData, - NtUserGetDCEx, NtUserGetDisplayConfigBufferSizes, NtUserGetIconInfo, NtUserGetMenuBarInfo, NtUserGetPriorityClipboardFormat, NtUserGetScrollBarInfo, NtUserGetSystemMenu, - NtUserGetUpdateRect, - NtUserGetUpdateRgn, NtUserGetUpdatedClipboardFormats, NtUserGetWindowPlacement, NtUserHideCaret, NtUserHiliteMenuItem, NtUserInternalGetWindowIcon, - NtUserInvalidateRect, - NtUserInvalidateRgn, NtUserIsClipboardFormatAvailable, NtUserMoveWindow, NtUserOpenClipboard, - NtUserRedrawWindow, NtUserRegisterClassExWOW, NtUserReleaseDC, NtUserScrollDC, - NtUserScrollWindowEx, NtUserSelectPalette, NtUserSetActiveWindow, NtUserSetCapture, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 2d9b8a29499..37d94aabcdb 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -104,6 +104,7 @@ static void * const syscalls[] = NtUserAddClipboardFormatListener, NtUserAssociateInputContext, NtUserAttachThreadInput, + NtUserBeginPaint, NtUserBuildHwndList, NtUserCallMsgFilter, NtUserCheckMenuItem, @@ -135,6 +136,7 @@ static void * const syscalls[] = NtUserGetCursor, NtUserGetCursorFrameInfo, NtUserGetCursorInfo, + NtUserGetDCEx, NtUserGetDoubleClickTime, NtUserGetDpiForMonitor, NtUserGetForegroundWindow, @@ -164,9 +166,13 @@ static void * const syscalls[] = NtUserGetSystemDpiForProcess, NtUserGetThreadDesktop, NtUserGetTitleBarInfo, + NtUserGetUpdateRect, + NtUserGetUpdateRgn, NtUserGetWindowRgnEx, NtUserInitializeClientPfnArrays, NtUserInternalGetWindowText, + NtUserInvalidateRect, + NtUserInvalidateRgn, NtUserKillTimer, NtUserLockWindowUpdate, NtUserMapVirtualKeyEx, @@ -181,11 +187,13 @@ static void * const syscalls[] = NtUserPostMessage, NtUserPostThreadMessage, NtUserQueryInputContext, + NtUserRedrawWindow, NtUserRegisterHotKey, NtUserRegisterRawInputDevices, NtUserRemoveClipboardFormatListener, NtUserRemoveMenu, NtUserRemoveProp, + NtUserScrollWindowEx, NtUserSendInput, NtUserSetCursorPos, NtUserSetKeyboardState, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 49cb00ae413..37d21d46a79 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -758,7 +758,7 @@ @ stub NtUserAutoPromoteMouseInPointer @ stub NtUserAutoRotateScreen @ stub NtUserBeginLayoutUpdate -@ stdcall NtUserBeginPaint(long ptr) +@ stdcall -syscall NtUserBeginPaint(long ptr) @ stub NtUserBitBltSysBmp @ stub NtUserBlockInput @ stub NtUserBroadcastThemeChangeEvent @@ -916,7 +916,7 @@ @ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr) @ stdcall -syscall NtUserGetCursorInfo(ptr) @ stub NtUserGetDC -@ stdcall NtUserGetDCEx(long long long) +@ stdcall -syscall NtUserGetDCEx(long long long) @ stub NtUserGetDManipHookInitFunction @ stub NtUserGetDesktopID @ stub NtUserGetDisplayAutoRotationPreferences @@ -1002,8 +1002,8 @@ @ stub NtUserGetTouchInputInfo @ stub NtUserGetTouchValidationStatus @ stub NtUserGetUniformSpaceMapping -@ stdcall NtUserGetUpdateRect(long ptr long) -@ stdcall NtUserGetUpdateRgn(long long long) +@ stdcall -syscall NtUserGetUpdateRect(long ptr long) +@ stdcall -syscall NtUserGetUpdateRgn(long long long) @ stdcall NtUserGetUpdatedClipboardFormats(ptr long ptr) @ stub NtUserGetWOWClass @ stub NtUserGetWindowBand @@ -1047,8 +1047,8 @@ @ stdcall NtUserInternalGetWindowIcon(ptr long) @ stdcall -syscall NtUserInternalGetWindowText(long ptr long) @ stub NtUserInternalToUnicode -@ stdcall NtUserInvalidateRect(long ptr long) -@ stdcall NtUserInvalidateRgn(long long long) +@ stdcall -syscall NtUserInvalidateRect(long ptr long) +@ stdcall -syscall NtUserInvalidateRgn(long long long) @ stub NtUserIsChildWindowDpiMessageEnabled @ stdcall NtUserIsClipboardFormatAvailable(long) @ stub NtUserIsMouseInPointerEnabled @@ -1120,7 +1120,7 @@ @ stub NtUserRealChildWindowFromPoint @ stub NtUserRealInternalGetMessage @ stub NtUserRealWaitMessageEx -@ stdcall NtUserRedrawWindow(long ptr long long) +@ stdcall -syscall NtUserRedrawWindow(long ptr long long) @ stub NtUserRegisterBSDRWindow @ stdcall NtUserRegisterClassExWOW(ptr ptr ptr ptr long long long) @ stub NtUserRegisterDManipHook @@ -1156,7 +1156,7 @@ @ stub NtUserRestoreWindowDpiChanges @ stub NtUserSBGetParms @ stdcall NtUserScrollDC(long long long ptr ptr long ptr) -@ stdcall NtUserScrollWindowEx(long long long ptr ptr long ptr long) +@ stdcall -syscall NtUserScrollWindowEx(long long long ptr ptr long ptr long) @ stdcall NtUserSelectPalette(long long long) @ stub NtUserSendEventMessage @ stdcall -syscall NtUserSendInput(long ptr long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 273be5da567..3cb16b0d300 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,7 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - HDC (WINAPI *pNtUserBeginPaint)( HWND hwnd, PAINTSTRUCT *ps ); ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code ); ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code ); LRESULT (WINAPI *pNtUserCallNextHookEx)( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ); @@ -233,7 +232,6 @@ struct unix_funcs ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ); HANDLE (WINAPI *pNtUserGetClipboardData)( UINT format, struct get_clipboard_params *params ); - HDC (WINAPI *pNtUserGetDCEx)( HWND hwnd, HRGN clip_rgn, DWORD flags ); LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info, UINT32 *num_mode_info ); BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module, @@ -242,19 +240,14 @@ struct unix_funcs INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info ); HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert ); - BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase ); - INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase ); BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement ); BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd ); BOOL (WINAPI *pNtUserHiliteMenuItem)( HWND hwnd, HMENU handle, UINT item, UINT hilite ); HICON (WINAPI *pNtUserInternalGetWindowIcon)( HWND hwnd, UINT type ); - BOOL (WINAPI *pNtUserInvalidateRect)( HWND hwnd, const RECT *rect, BOOL erase ); - BOOL (WINAPI *pNtUserInvalidateRgn)( HWND hwnd, HRGN hrgn, BOOL erase ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk ); - BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, @@ -262,9 +255,6 @@ struct unix_funcs INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc ); BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip, HRGN ret_update_rgn, RECT *update_rect ); - INT (WINAPI *pNtUserScrollWindowEx)( HWND hwnd, INT dx, INT dy, const RECT *rect, - const RECT *clip_rect, HRGN update_rgn, - RECT *update_rect, UINT flags ); HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg ); HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd ); HWND (WINAPI *pNtUserSetCapture)( HWND hwnd ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 3289d70010b..6f6bad05b28 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserBeginPaint( hwnd, ps ); -} - LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) { if (!unix_funcs) return 0; @@ -944,12 +938,6 @@ HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params * return unix_funcs->pNtUserGetClipboardData( format, params ); }
-HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetDCEx( hwnd, clip_rgn, flags ); -} - LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info, UINT32 *num_mode_info ) { @@ -976,18 +964,6 @@ HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert ) return unix_funcs->pNtUserGetSystemMenu( hwnd, revert ); }
-BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserGetUpdateRect( hwnd, rect, erase ); -} - -INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetUpdateRgn( hwnd, hrgn, erase ); -} - BOOL WINAPI NtUserHideCaret( HWND hwnd ) { if (!unix_funcs) return FALSE; @@ -1037,18 +1013,6 @@ HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type ) return unix_funcs->pNtUserInternalGetWindowIcon( hwnd, type ); }
-BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserInvalidateRect( hwnd, rect, erase ); -} - -BOOL WINAPI NtUserInvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserInvalidateRgn( hwnd, hrgn, erase ); -} - BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) { if (!unix_funcs) return FALSE; @@ -1061,12 +1025,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk ) return unix_funcs->pNtUserOpenClipboard( hwnd, unk ); }
-BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserRedrawWindow( hwnd, rect, hrgn, flags ); -} - ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags, DWORD *wow ) @@ -1088,15 +1046,6 @@ BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const R return unix_funcs->pNtUserScrollDC( hdc, dx, dy, scroll, clip, ret_update_rgn, update_rect ); }
-INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect, - const RECT *clip_rect, HRGN update_rgn, - RECT *update_rect, UINT flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, - update_rgn, update_rect, flags ); -} - HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg ) { if (!unix_funcs) return 0; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index fff01036c6c..aa152eeb650 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -91,6 +91,7 @@ SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserAssociateInputContext ) \ SYSCALL_ENTRY( NtUserAttachThreadInput ) \ + SYSCALL_ENTRY( NtUserBeginPaint ) \ SYSCALL_ENTRY( NtUserBuildHwndList ) \ SYSCALL_ENTRY( NtUserCallMsgFilter ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ @@ -122,6 +123,7 @@ SYSCALL_ENTRY( NtUserGetCursor ) \ SYSCALL_ENTRY( NtUserGetCursorFrameInfo ) \ SYSCALL_ENTRY( NtUserGetCursorInfo ) \ + SYSCALL_ENTRY( NtUserGetDCEx ) \ SYSCALL_ENTRY( NtUserGetDoubleClickTime ) \ SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \ SYSCALL_ENTRY( NtUserGetForegroundWindow ) \ @@ -151,9 +153,13 @@ SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ SYSCALL_ENTRY( NtUserGetTitleBarInfo ) \ + SYSCALL_ENTRY( NtUserGetUpdateRect ) \ + SYSCALL_ENTRY( NtUserGetUpdateRgn ) \ SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \ SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \ SYSCALL_ENTRY( NtUserInternalGetWindowText ) \ + SYSCALL_ENTRY( NtUserInvalidateRect ) \ + SYSCALL_ENTRY( NtUserInvalidateRgn ) \ SYSCALL_ENTRY( NtUserKillTimer ) \ SYSCALL_ENTRY( NtUserLockWindowUpdate ) \ SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \ @@ -168,11 +174,13 @@ SYSCALL_ENTRY( NtUserPostMessage ) \ SYSCALL_ENTRY( NtUserPostThreadMessage ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \ + SYSCALL_ENTRY( NtUserRedrawWindow ) \ SYSCALL_ENTRY( NtUserRegisterHotKey ) \ SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \ SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserRemoveMenu ) \ SYSCALL_ENTRY( NtUserRemoveProp ) \ + SYSCALL_ENTRY( NtUserScrollWindowEx ) \ SYSCALL_ENTRY( NtUserSendInput ) \ SYSCALL_ENTRY( NtUserSetCursorPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 53fdaa6db63..6f306e95c5d 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -108,6 +108,16 @@ typedef struct } DUMMYUNIONNAME; } INPUT32;
+typedef struct +{ + UINT32 hdc; + BOOL fErase; + RECT rcPaint; + BOOL fRestore; + BOOL fIncUpdate; + BYTE rgbReserved[32]; +} PAINTSTRUCT32; + static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 ) { if (!msg32) return NULL; @@ -167,6 +177,24 @@ NTSTATUS WINAPI wow64_NtUserAttachThreadInput( UINT *args ) return NtUserAttachThreadInput( from, to, attach ); }
+NTSTATUS WINAPI wow64_NtUserBeginPaint( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + PAINTSTRUCT32 *ps32 = get_ptr( &args ); + + PAINTSTRUCT ps; + HDC ret; + + ret = NtUserBeginPaint( hwnd, ps32 ? & ps : NULL ); + if (ret && ps32) + { + ps32->hdc = HandleToUlong( ps.hdc ); + ps32->fErase = ps.fErase; + ps32->rcPaint = ps.rcPaint; + } + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtUserBuildHwndList( UINT *args ) { HDESK desktop = get_handle( &args ); @@ -470,6 +498,15 @@ NTSTATUS WINAPI wow64_NtUserGetCursorInfo( UINT *args ) return TRUE; }
+NTSTATUS WINAPI wow64_NtUserGetDCEx( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HRGN clip_rgn = get_handle( &args ); + DWORD flags = get_ulong( &args ); + + return HandleToUlong( NtUserGetDCEx( hwnd, clip_rgn, flags )); +} + NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args ) { return NtUserGetDoubleClickTime(); @@ -897,6 +934,24 @@ NTSTATUS WINAPI wow64_NtUserGetTitleBarInfo( UINT *args ) return NtUserGetTitleBarInfo( hwnd, info ); }
+NTSTATUS WINAPI wow64_NtUserGetUpdateRect( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + RECT *rect = get_ptr( &args ); + BOOL erase = get_ulong( &args ); + + return NtUserGetUpdateRect( hwnd, rect, erase ); +} + +NTSTATUS WINAPI wow64_NtUserGetUpdateRgn( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + BOOL erase = get_ulong( &args ); + + return NtUserGetUpdateRgn( hwnd, hrgn, erase ); +} + NTSTATUS WINAPI wow64_NtUserGetWindowRgnEx( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -921,6 +976,24 @@ NTSTATUS WINAPI wow64_NtUserInternalGetWindowText( UINT *args ) return NtUserInternalGetWindowText( hwnd, text, count ); }
+NTSTATUS WINAPI wow64_NtUserInvalidateRect( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const RECT *rect = get_ptr( &args ); + BOOL erase = get_ulong( &args ); + + return NtUserInvalidateRect( hwnd, rect, erase ); +} + +NTSTATUS WINAPI wow64_NtUserInvalidateRgn( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + BOOL erase = get_ulong( &args ); + + return NtUserInvalidateRgn( hwnd, hrgn, erase ); +} + NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1075,6 +1148,16 @@ NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args ) return NtUserQueryInputContext( handle, attr ); }
+NTSTATUS WINAPI wow64_NtUserRedrawWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const RECT *rect = get_ptr( &args ); + HRGN hrgn = get_handle( &args ); + UINT flags = get_ulong( &args ); + + return NtUserRedrawWindow( hwnd, rect, hrgn, flags ); +} + NTSTATUS WINAPI wow64_NtUserRegisterHotKey( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1141,6 +1224,20 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args ) return HandleToUlong( NtUserRemoveProp( hwnd, str )); }
+NTSTATUS WINAPI wow64_NtUserScrollWindowEx( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + INT dx = get_ulong( &args ); + INT dy = get_ulong( &args ); + const RECT *rect = get_ptr( &args ); + const RECT *clip_rect = get_ptr( &args ); + HRGN update_rgn = get_handle( &args ); + RECT *update_rect = get_ptr( &args ); + UINT flags = get_ulong( &args ); + + return NtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, update_rgn, update_rect, flags ); +} + NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args ) { UINT count = get_ulong( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 2 -- dlls/win32u/syscall.c | 2 ++ dlls/win32u/win32u.spec | 4 ++-- dlls/win32u/win32u_private.h | 2 -- dlls/win32u/wrappers.c | 12 ------------ dlls/wow64win/syscall.h | 2 ++ dlls/wow64win/user.c | 18 ++++++++++++++++++ 7 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 5bb8adedf44..18881afd27c 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,8 +1136,6 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserCallHwnd, - NtUserCallHwndParam, NtUserCallNextHookEx, NtUserCallNoParam, NtUserCallOneParam, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 37d94aabcdb..ee6b3fa31d1 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -106,6 +106,8 @@ static void * const syscalls[] = NtUserAttachThreadInput, NtUserBeginPaint, NtUserBuildHwndList, + NtUserCallHwnd, + NtUserCallHwndParam, NtUserCallMsgFilter, NtUserCheckMenuItem, NtUserChildWindowFromPointEx, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 37d21d46a79..fa4fbbcdfe9 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -768,11 +768,11 @@ @ stub NtUserBuildPropList @ stub NtUserCalcMenuBar @ stub NtUserCalculatePopupWindowPosition -@ stdcall NtUserCallHwnd(long long) +@ stdcall -syscall NtUserCallHwnd(long long) @ stub NtUserCallHwndLock @ stub NtUserCallHwndLockSafe @ stub NtUserCallHwndOpt -@ stdcall NtUserCallHwndParam(long ptr long) +@ stdcall -syscall NtUserCallHwndParam(long ptr long) @ stub NtUserCallHwndParamLock @ stub NtUserCallHwndParamLockSafe @ stub NtUserCallHwndSafe diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 3cb16b0d300..9ef7d8906a7 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,8 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code ); - ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code ); LRESULT (WINAPI *pNtUserCallNextHookEx)( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ); ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code ); ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 6f6bad05b28..2cfc6c050db 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -749,18 +749,6 @@ ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code return unix_funcs->pNtUserCallTwoParam( arg1, arg2, code ); }
-ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallHwnd( hwnd, code ); -} - -ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallHwndParam( hwnd, param, code ); -} - BOOL WINAPI NtUserCloseClipboard(void) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index aa152eeb650..71f01ce6207 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -93,6 +93,8 @@ SYSCALL_ENTRY( NtUserAttachThreadInput ) \ SYSCALL_ENTRY( NtUserBeginPaint ) \ SYSCALL_ENTRY( NtUserBuildHwndList ) \ + SYSCALL_ENTRY( NtUserCallHwnd ) \ + SYSCALL_ENTRY( NtUserCallHwndParam ) \ SYSCALL_ENTRY( NtUserCallMsgFilter ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ SYSCALL_ENTRY( NtUserChildWindowFromPointEx ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 6f306e95c5d..13d6d1636cf 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -220,6 +220,24 @@ NTSTATUS WINAPI wow64_NtUserBuildHwndList( UINT *args ) return status; }
+NTSTATUS WINAPI wow64_NtUserCallHwnd( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + DWORD code = get_ulong( &args ); + + return NtUserCallHwnd( hwnd, code ); +} + +NTSTATUS WINAPI wow64_NtUserCallHwndParam( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + DWORD_PTR param = get_ulong( &args ); + DWORD code = get_ulong( &args ); + + FIXME( "%p %Ix %lu\n", hwnd, param, code ); + return 0; +} + NTSTATUS WINAPI wow64_NtUserCallMsgFilter( UINT *args ) { MSG32 *msg32 = get_ptr( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 4 ---- dlls/win32u/syscall.c | 4 ++++ dlls/win32u/win32u.spec | 8 ++++---- dlls/win32u/win32u_private.h | 4 ---- dlls/win32u/wrappers.c | 24 ------------------------ dlls/wow64win/syscall.h | 4 ++++ dlls/wow64win/user.c | 36 ++++++++++++++++++++++++++++++++++++ 7 files changed, 48 insertions(+), 36 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 18881afd27c..f6e918721a4 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,10 +1136,6 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserCallNextHookEx, - NtUserCallNoParam, - NtUserCallOneParam, - NtUserCallTwoParam, NtUserChangeClipboardChain, NtUserChangeDisplaySettings, NtUserClipCursor, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index ee6b3fa31d1..ffe1703e1e7 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -109,6 +109,10 @@ static void * const syscalls[] = NtUserCallHwnd, NtUserCallHwndParam, NtUserCallMsgFilter, + NtUserCallNextHookEx, + NtUserCallNoParam, + NtUserCallOneParam, + NtUserCallTwoParam, NtUserCheckMenuItem, NtUserChildWindowFromPointEx, NtUserCloseDesktop, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index fa4fbbcdfe9..d12b904d3bb 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -777,10 +777,10 @@ @ stub NtUserCallHwndParamLockSafe @ stub NtUserCallHwndSafe @ stdcall -syscall NtUserCallMsgFilter(ptr long) -@ stdcall NtUserCallNextHookEx(long long long long) -@ stdcall NtUserCallNoParam(long) -@ stdcall NtUserCallOneParam(long long) -@ stdcall NtUserCallTwoParam(long long long) +@ stdcall -syscall NtUserCallNextHookEx(long long long long) +@ stdcall -syscall NtUserCallNoParam(long) +@ stdcall -syscall NtUserCallOneParam(long long) +@ stdcall -syscall NtUserCallTwoParam(long long long) @ stub NtUserCanBrokerForceForeground @ stdcall NtUserChangeClipboardChain(long long) @ stdcall NtUserChangeDisplaySettings(ptr ptr long long ptr) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 9ef7d8906a7..4fa0b0e3493 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,10 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - LRESULT (WINAPI *pNtUserCallNextHookEx)( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ); - ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code ); - ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code ); - ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); BOOL (WINAPI *pNtUserChangeClipboardChain)( HWND hwnd, HWND next ); LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, DWORD flags, void *lparam ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 2cfc6c050db..c9cf89f5fe7 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,30 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallNextHookEx( hhook, code, wparam, lparam ); -} - -ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallNoParam( code ); -} - -ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallOneParam( arg, code ); -} - -ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCallTwoParam( arg1, arg2, code ); -} - BOOL WINAPI NtUserCloseClipboard(void) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 71f01ce6207..8ff061ec7f8 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -96,6 +96,10 @@ SYSCALL_ENTRY( NtUserCallHwnd ) \ SYSCALL_ENTRY( NtUserCallHwndParam ) \ SYSCALL_ENTRY( NtUserCallMsgFilter ) \ + SYSCALL_ENTRY( NtUserCallNextHookEx ) \ + SYSCALL_ENTRY( NtUserCallNoParam ) \ + SYSCALL_ENTRY( NtUserCallOneParam ) \ + SYSCALL_ENTRY( NtUserCallTwoParam ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ SYSCALL_ENTRY( NtUserChildWindowFromPointEx ) \ SYSCALL_ENTRY( NtUserCloseDesktop ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 13d6d1636cf..4f6d6cbbb26 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -250,6 +250,42 @@ NTSTATUS WINAPI wow64_NtUserCallMsgFilter( UINT *args ) return ret; }
+NTSTATUS WINAPI wow64_NtUserCallNextHookEx( UINT *args ) +{ + HHOOK hhook = get_handle( &args ); + INT code = get_ulong( &args ); + WPARAM wparam = get_ulong( &args ); + LPARAM lparam = get_ulong( &args ); + + return NtUserCallNextHookEx( hhook, code, wparam, lparam ); +} + +NTSTATUS WINAPI wow64_NtUserCallNoParam( UINT *args ) +{ + ULONG code = get_ulong( &args ); + + return NtUserCallNoParam( code ); +} + +NTSTATUS WINAPI wow64_NtUserCallOneParam( UINT *args ) +{ + ULONG_PTR arg = get_ulong( &args ); + ULONG code = get_ulong( &args ); + + FIXME( "%Ix %lu\n", arg, code ); + return 0; +} + +NTSTATUS WINAPI wow64_NtUserCallTwoParam( UINT *args ) +{ + ULONG_PTR arg1 = get_ulong( &args ); + ULONG_PTR arg2 = get_ulong( &args ); + ULONG code = get_ulong( &args ); + + FIXME( "%Ix %Ix %lu\n", arg1, arg2, code ); + return 0; +} + NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args ) { HMENU handle = get_handle( &args );
This merge request was approved by Huw Davies.