From: Zebediah Figura zfigura@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 | 18 ++++++++++++++++++ 7 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 0b148a628b3..9d95d3cf94a 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1184,7 +1184,6 @@ static struct unix_funcs unix_funcs = NtUserGetMessage, NtUserGetPriorityClipboardFormat, NtUserGetQueueStatus, - NtUserGetRawInputBuffer, NtUserGetSystemMenu, NtUserGetUpdateRect, NtUserGetUpdateRgn, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index cf5615f4dde..12af30f6c98 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -145,6 +145,7 @@ static void * const syscalls[] = NtUserGetProcessDpiAwarenessContext, NtUserGetProcessWindowStation, NtUserGetProp, + NtUserGetRawInputBuffer, NtUserGetRawInputData, NtUserGetSystemDpiForProcess, NtUserGetThreadDesktop, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 80bfb0bc253..c71f0d20429 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -983,7 +983,7 @@ @ stdcall -syscall NtUserGetProp(long wstr) @ stdcall NtUserGetQueueStatus(long) @ stub NtUserGetQueueStatusReadonly -@ stdcall NtUserGetRawInputBuffer(ptr ptr long) +@ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long) @ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long) @ stub NtUserGetRawInputDeviceInfo @ stub NtUserGetRawInputDeviceList diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 7b4b820d392..a3f3855de7a 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -248,7 +248,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserGetMessage)( MSG *msg, HWND hwnd, UINT first, UINT last ); INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags ); - UINT (WINAPI *pNtUserGetRawInputBuffer)( RAWINPUT *data, UINT *data_size, UINT header_size ); 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 ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index a4504135314..b451e57e3b1 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -1048,12 +1048,6 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags ) return unix_funcs->pNtUserGetQueueStatus( flags ); }
-UINT WINAPI DECLSPEC_HOTPATCH NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT header_size ) -{ - if (!unix_funcs) return ~0u; - return unix_funcs->pNtUserGetRawInputBuffer( data, data_size, header_size ); -} - BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 6c4e12bf59a..618a7990554 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -132,6 +132,7 @@ SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetProp ) \ + SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \ SYSCALL_ENTRY( NtUserGetRawInputData ) \ SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 8105b66654c..9c6730b24ae 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -957,3 +957,21 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args ) return ~0u; } } + +NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args ) +{ + RAWINPUT *data = get_ptr( &args ); + UINT *data_size = get_ptr( &args ); + UINT header_size = get_ulong( &args ); + + if (header_size != sizeof(RAWINPUTHEADER32)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return ~0u; + } + + /* RAWINPUT has different sizes on 32-bit and 64-bit, but no translation is + * done. The function actually returns different structures depending on + * whether it's operating under WoW64 or not. */ + return NtUserGetRawInputBuffer( data, data_size, sizeof(RAWINPUTHEADER) ); +}