Module: wine Branch: master Commit: 8fed1c68098f521492d2bd28679745733f22238e URL: https://source.winehq.org/git/wine.git/?a=commit;h=8fed1c68098f521492d2bd286...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Aug 2 16:11:21 2021 +0200
wow64: Add a thunk for the wine_server_call() syscall.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wow64/struct32.h | 20 ++++++++++++++++++++ dlls/wow64/syscall.c | 25 +++++++++++++++++++++++++ dlls/wow64/syscall.h | 1 + 3 files changed, 46 insertions(+)
diff --git a/dlls/wow64/struct32.h b/dlls/wow64/struct32.h index 419575c2ede..dd5814f431b 100644 --- a/dlls/wow64/struct32.h +++ b/dlls/wow64/struct32.h @@ -21,6 +21,8 @@ #ifndef __WOW64_STRUCT32_H #define __WOW64_STRUCT32_H
+#include "wine/server.h" + typedef struct { ULONG Length; @@ -633,4 +635,22 @@ typedef struct SYSTEM_THREAD_INFORMATION32 ti[1]; } SYSTEM_PROCESS_INFORMATION32;
+struct __server_iovec32 +{ + ULONG ptr; + data_size_t size; +}; + +struct __server_request_info32 +{ + union + { + union generic_request req; + union generic_reply reply; + } u; + unsigned int data_count; + ULONG reply_data; + struct __server_iovec32 data[__SERVER_MAX_DATA]; +}; + #endif /* __WOW64_STRUCT32_H */ diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 29d358595b0..2fd9f309b1b 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -242,6 +242,31 @@ NTSTATUS WINAPI wow64_NtSetDefaultUILanguage( UINT *args ) }
+/********************************************************************** + * wow64_wine_server_call + */ +NTSTATUS WINAPI wow64_wine_server_call( UINT *args ) +{ + struct __server_request_info32 *req32 = get_ptr( &args ); + + unsigned int i; + NTSTATUS status; + struct __server_request_info req; + + req.u.req = req32->u.req; + req.data_count = req32->data_count; + for (i = 0; i < req.data_count; i++) + { + req.data[i].ptr = ULongToPtr( req32->data[i].ptr ); + req.data[i].size = req32->data[i].size; + } + req.reply_data = ULongToPtr( req32->reply_data ); + status = wine_server_call( &req ); + req32->u.reply = req.u.reply; + return status; +} + + /********************************************************************** * get_syscall_num */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 765456a8ab7..782a7a78c18 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -235,6 +235,7 @@ SYSCALL_ENTRY( NtWriteVirtualMemory ) \ SYSCALL_ENTRY( NtYieldExecution ) \ SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \ + SYSCALL_ENTRY( wine_server_call ) \ SYSCALL_ENTRY( wine_unix_to_nt_file_name )
#endif /* __WOW64_SYSCALL_H */