diff --git a/dlls/wow64/file.c b/dlls/wow64/file.c index c8590437254..7d1c736e48c 100644 --- a/dlls/wow64/file.c +++ b/dlls/wow64/file.c @@ -352,6 +352,32 @@ NTSTATUS WINAPI wow64_NtDeleteFile( UINT *args ) } +/********************************************************************** + * wow64_NtDeviceIoControlFile + */ +NTSTATUS WINAPI wow64_NtDeviceIoControlFile( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + HANDLE event = get_handle( &args ); + ULONG apc = get_ulong( &args ); + ULONG apc_param = get_ulong( &args ); + IO_STATUS_BLOCK32 *io32 = get_ptr( &args ); + ULONG code = get_ulong( &args ); + void *in_buf = get_ptr( &args ); + ULONG in_len = get_ulong( &args ); + void *out_buf = get_ptr( &args ); + ULONG out_len = get_ulong( &args ); + + IO_STATUS_BLOCK io; + NTSTATUS status; + + status = NtDeviceIoControlFile( handle, event, apc_32to64( apc ), apc_param_32to64( apc, apc_param ), + iosb_32to64( &io, io32 ), code, in_buf, in_len, out_buf, out_len ); + put_iosb( io32, &io ); + return status; +} + + /********************************************************************** * wow64_NtFlushBuffersFile */ @@ -369,6 +395,32 @@ NTSTATUS WINAPI wow64_NtFlushBuffersFile( UINT *args ) } +/********************************************************************** + * wow64_NtFsControlFile + */ +NTSTATUS WINAPI wow64_NtFsControlFile( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + HANDLE event = get_handle( &args ); + ULONG apc = get_ulong( &args ); + ULONG apc_param = get_ulong( &args ); + IO_STATUS_BLOCK32 *io32 = get_ptr( &args ); + ULONG code = get_ulong( &args ); + void *in_buf = get_ptr( &args ); + ULONG in_len = get_ulong( &args ); + void *out_buf = get_ptr( &args ); + ULONG out_len = get_ulong( &args ); + + IO_STATUS_BLOCK io; + NTSTATUS status; + + status = NtFsControlFile( handle, event, apc_32to64( apc ), apc_param_32to64( apc, apc_param ), + iosb_32to64( &io, io32 ), code, in_buf, in_len, out_buf, out_len ); + put_iosb( io32, &io ); + return status; +} + + /********************************************************************** * wow64_NtLockFile */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index f0b5b2ed668..6ae43e0e8ef 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -75,6 +75,7 @@ SYSCALL_ENTRY( NtDeleteFile ) \ SYSCALL_ENTRY( NtDeleteKey ) \ SYSCALL_ENTRY( NtDeleteValueKey ) \ + SYSCALL_ENTRY( NtDeviceIoControlFile ) \ SYSCALL_ENTRY( NtDisplayString ) \ SYSCALL_ENTRY( NtDuplicateObject ) \ SYSCALL_ENTRY( NtDuplicateToken ) \ @@ -88,6 +89,7 @@ SYSCALL_ENTRY( NtFlushProcessWriteBuffers ) \ SYSCALL_ENTRY( NtFlushVirtualMemory ) \ SYSCALL_ENTRY( NtFreeVirtualMemory ) \ + SYSCALL_ENTRY( NtFsControlFile ) \ SYSCALL_ENTRY( NtGetContextThread ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtGetNextThread ) \