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 */