Alexandre Julliard : wow64: Add thunks for the write watch syscalls.
Alexandre Julliard
julliard at winehq.org
Tue Jul 27 15:51:00 CDT 2021
Module: wine
Branch: master
Commit: e57d5003088f7ea00516bcdaf92bb068a4b442ef
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e57d5003088f7ea00516bcdaf92bb068a4b442ef
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 27 11:24:33 2021 +0200
wow64: Add thunks for the write watch syscalls.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wow64/syscall.h | 2 ++
dlls/wow64/virtual.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h
index 516e0d833c4..95c2cf646e3 100644
--- a/dlls/wow64/syscall.h
+++ b/dlls/wow64/syscall.h
@@ -64,6 +64,7 @@
SYSCALL_ENTRY( NtFreeVirtualMemory ) \
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
SYSCALL_ENTRY( NtGetNlsSectionPtr ) \
+ SYSCALL_ENTRY( NtGetWriteWatch ) \
SYSCALL_ENTRY( NtListenPort ) \
SYSCALL_ENTRY( NtLoadKey ) \
SYSCALL_ENTRY( NtLoadKey2 ) \
@@ -113,6 +114,7 @@
SYSCALL_ENTRY( NtReplyWaitReceivePort ) \
SYSCALL_ENTRY( NtRequestWaitReplyPort ) \
SYSCALL_ENTRY( NtResetEvent ) \
+ SYSCALL_ENTRY( NtResetWriteWatch ) \
SYSCALL_ENTRY( NtRestoreKey ) \
SYSCALL_ENTRY( NtSaveKey ) \
SYSCALL_ENTRY( NtSecureConnectPort ) \
diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c
index 27b46ee74e8..fad79a2de60 100644
--- a/dlls/wow64/virtual.c
+++ b/dlls/wow64/virtual.c
@@ -177,6 +177,38 @@ NTSTATUS WINAPI wow64_NtGetNlsSectionPtr( UINT *args )
}
+/**********************************************************************
+ * wow64_NtGetWriteWatch
+ */
+NTSTATUS WINAPI wow64_NtGetWriteWatch( UINT *args )
+{
+ HANDLE handle = get_handle( &args );
+ ULONG flags = get_ulong( &args );
+ void *base = get_ptr( &args );
+ SIZE_T size = get_ulong( &args );
+ ULONG *addr_ptr = get_ptr( &args );
+ ULONG *count_ptr = get_ptr( &args );
+ ULONG *granularity = get_ptr( &args );
+
+ ULONG_PTR i, count = *count_ptr;
+ void **addresses;
+ NTSTATUS status;
+
+ if (!count || !size) return STATUS_INVALID_PARAMETER;
+ if (flags & ~WRITE_WATCH_FLAG_RESET) return STATUS_INVALID_PARAMETER;
+ if (!addr_ptr) return STATUS_ACCESS_VIOLATION;
+
+ addresses = RtlAllocateHeap( GetProcessHeap(), 0, count * sizeof(*addresses) );
+ if (!(status = NtGetWriteWatch( handle, flags, base, size, addresses, &count, granularity )))
+ {
+ for (i = 0; i < count; i++) addr_ptr[i] = PtrToUlong( addresses[i] );
+ *count_ptr = count;
+ }
+ RtlFreeHeap( GetProcessHeap(), 0, addresses );
+ return status;
+}
+
+
/**********************************************************************
* wow64_NtLockVirtualMemory
*/
@@ -279,6 +311,19 @@ NTSTATUS WINAPI wow64_NtReadVirtualMemory( UINT *args )
}
+/**********************************************************************
+ * wow64_NtResetWriteWatch
+ */
+NTSTATUS WINAPI wow64_NtResetWriteWatch( UINT *args )
+{
+ HANDLE process = get_handle( &args );
+ void *base = get_ptr( &args );
+ SIZE_T size = get_ulong( &args );
+
+ return NtResetWriteWatch( process, base, size );
+}
+
+
/**********************************************************************
* wow64_NtUnlockVirtualMemory
*/
More information about the wine-cvs
mailing list