Commit e57d5003 authored by Alexandre Julliard's avatar Alexandre Julliard

wow64: Add thunks for the write watch syscalls.

parent 458b859d
......@@ -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 ) \
......
......@@ -178,6 +178,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
*/
NTSTATUS WINAPI wow64_NtLockVirtualMemory( UINT *args )
......@@ -280,6 +312,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
*/
NTSTATUS WINAPI wow64_NtUnlockVirtualMemory( UINT *args )
......
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