Alexandre Julliard : wow64: Add thunks for ioctl/fsctl syscalls.
Alexandre Julliard
julliard at winehq.org
Thu Aug 5 16:13:39 CDT 2021
Module: wine
Branch: master
Commit: 2aea3368377f4322d93e5d3a4506af5a5da3c473
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2aea3368377f4322d93e5d3a4506af5a5da3c473
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Aug 5 15:39:05 2021 +0200
wow64: Add thunks for ioctl/fsctl syscalls.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wow64/file.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
dlls/wow64/syscall.h | 2 ++
2 files changed, 54 insertions(+)
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 ) \
More information about the wine-cvs
mailing list