Commit 8fed1c68 authored by Alexandre Julliard's avatar Alexandre Julliard

wow64: Add a thunk for the wine_server_call() syscall.

parent 580ad389
......@@ -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 */
......@@ -243,6 +243,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
*/
static DWORD get_syscall_num( const BYTE *syscall )
......
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment