wow64: Add thunks for the memory mapping syscalls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dffe2bf8e2
commit
458b859ddf
|
@ -28,6 +28,7 @@
|
||||||
SYSCALL_ENTRY( NtAllocateUuids ) \
|
SYSCALL_ENTRY( NtAllocateUuids ) \
|
||||||
SYSCALL_ENTRY( NtAllocateVirtualMemory ) \
|
SYSCALL_ENTRY( NtAllocateVirtualMemory ) \
|
||||||
SYSCALL_ENTRY( NtAllocateVirtualMemoryEx ) \
|
SYSCALL_ENTRY( NtAllocateVirtualMemoryEx ) \
|
||||||
|
SYSCALL_ENTRY( NtAreMappedFilesTheSame ) \
|
||||||
SYSCALL_ENTRY( NtCancelTimer ) \
|
SYSCALL_ENTRY( NtCancelTimer ) \
|
||||||
SYSCALL_ENTRY( NtClearEvent ) \
|
SYSCALL_ENTRY( NtClearEvent ) \
|
||||||
SYSCALL_ENTRY( NtClearPowerRequest ) \
|
SYSCALL_ENTRY( NtClearPowerRequest ) \
|
||||||
|
@ -62,11 +63,13 @@
|
||||||
SYSCALL_ENTRY( NtFlushVirtualMemory ) \
|
SYSCALL_ENTRY( NtFlushVirtualMemory ) \
|
||||||
SYSCALL_ENTRY( NtFreeVirtualMemory ) \
|
SYSCALL_ENTRY( NtFreeVirtualMemory ) \
|
||||||
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
|
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
|
||||||
|
SYSCALL_ENTRY( NtGetNlsSectionPtr ) \
|
||||||
SYSCALL_ENTRY( NtListenPort ) \
|
SYSCALL_ENTRY( NtListenPort ) \
|
||||||
SYSCALL_ENTRY( NtLoadKey ) \
|
SYSCALL_ENTRY( NtLoadKey ) \
|
||||||
SYSCALL_ENTRY( NtLoadKey2 ) \
|
SYSCALL_ENTRY( NtLoadKey2 ) \
|
||||||
SYSCALL_ENTRY( NtLockVirtualMemory ) \
|
SYSCALL_ENTRY( NtLockVirtualMemory ) \
|
||||||
SYSCALL_ENTRY( NtMakeTemporaryObject ) \
|
SYSCALL_ENTRY( NtMakeTemporaryObject ) \
|
||||||
|
SYSCALL_ENTRY( NtMapViewOfSection ) \
|
||||||
SYSCALL_ENTRY( NtOpenDirectoryObject ) \
|
SYSCALL_ENTRY( NtOpenDirectoryObject ) \
|
||||||
SYSCALL_ENTRY( NtOpenEvent ) \
|
SYSCALL_ENTRY( NtOpenEvent ) \
|
||||||
SYSCALL_ENTRY( NtOpenIoCompletion ) \
|
SYSCALL_ENTRY( NtOpenIoCompletion ) \
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
SYSCALL_ENTRY( NtTerminateJobObject ) \
|
SYSCALL_ENTRY( NtTerminateJobObject ) \
|
||||||
SYSCALL_ENTRY( NtUnloadKey ) \
|
SYSCALL_ENTRY( NtUnloadKey ) \
|
||||||
SYSCALL_ENTRY( NtUnlockVirtualMemory ) \
|
SYSCALL_ENTRY( NtUnlockVirtualMemory ) \
|
||||||
|
SYSCALL_ENTRY( NtUnmapViewOfSection ) \
|
||||||
SYSCALL_ENTRY( NtWaitForDebugEvent ) \
|
SYSCALL_ENTRY( NtWaitForDebugEvent ) \
|
||||||
SYSCALL_ENTRY( NtWaitForKeyedEvent ) \
|
SYSCALL_ENTRY( NtWaitForKeyedEvent ) \
|
||||||
SYSCALL_ENTRY( NtWaitForMultipleObjects ) \
|
SYSCALL_ENTRY( NtWaitForMultipleObjects ) \
|
||||||
|
|
|
@ -89,6 +89,18 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemoryEx( UINT *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* wow64_NtAreMappedFilesTheSame
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPI wow64_NtAreMappedFilesTheSame( UINT *args )
|
||||||
|
{
|
||||||
|
void *ptr1 = get_ptr( &args );
|
||||||
|
void *ptr2 = get_ptr( &args );
|
||||||
|
|
||||||
|
return NtAreMappedFilesTheSame( ptr1, ptr2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* wow64_NtFlushVirtualMemory
|
* wow64_NtFlushVirtualMemory
|
||||||
*/
|
*/
|
||||||
|
@ -139,6 +151,32 @@ NTSTATUS WINAPI wow64_NtFreeVirtualMemory( UINT *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* wow64_NtGetNlsSectionPtr
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPI wow64_NtGetNlsSectionPtr( UINT *args )
|
||||||
|
{
|
||||||
|
ULONG type = get_ulong( &args );
|
||||||
|
ULONG id = get_ulong( &args );
|
||||||
|
void *unknown = get_ptr( &args );
|
||||||
|
ULONG *addr32 = get_ptr( &args );
|
||||||
|
ULONG *size32 = get_ptr( &args );
|
||||||
|
|
||||||
|
void *addr;
|
||||||
|
SIZE_T size;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
|
status = NtGetNlsSectionPtr( type, id, unknown, addr_32to64( &addr, addr32 ),
|
||||||
|
size_32to64( &size, size32 ));
|
||||||
|
if (!status)
|
||||||
|
{
|
||||||
|
put_addr( addr32, addr );
|
||||||
|
put_size( size32, size );
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* wow64_NtLockVirtualMemory
|
* wow64_NtLockVirtualMemory
|
||||||
*/
|
*/
|
||||||
|
@ -164,6 +202,37 @@ NTSTATUS WINAPI wow64_NtLockVirtualMemory( UINT *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* wow64_NtMapViewOfSection
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPI wow64_NtMapViewOfSection( UINT *args )
|
||||||
|
{
|
||||||
|
HANDLE handle = get_handle( &args );
|
||||||
|
HANDLE process = get_handle( &args );
|
||||||
|
ULONG *addr32 = get_ptr( &args );
|
||||||
|
ULONG_PTR zero_bits = get_ulong( &args );
|
||||||
|
SIZE_T commit = get_ulong( &args );
|
||||||
|
const LARGE_INTEGER *offset = get_ptr( &args );
|
||||||
|
ULONG *size32 = get_ptr( &args );
|
||||||
|
SECTION_INHERIT inherit = get_ulong( &args );
|
||||||
|
ULONG alloc = get_ulong( &args );
|
||||||
|
ULONG protect = get_ulong( &args );
|
||||||
|
|
||||||
|
void *addr;
|
||||||
|
SIZE_T size;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
|
status = NtMapViewOfSection( handle, process, addr_32to64( &addr, addr32 ), get_zero_bits( zero_bits ),
|
||||||
|
commit, offset, size_32to64( &size, size32 ), inherit, alloc, protect );
|
||||||
|
if (NT_SUCCESS(status))
|
||||||
|
{
|
||||||
|
put_addr( addr32, addr );
|
||||||
|
put_size( size32, size );
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* wow64_NtProtectVirtualMemory
|
* wow64_NtProtectVirtualMemory
|
||||||
*/
|
*/
|
||||||
|
@ -235,6 +304,18 @@ NTSTATUS WINAPI wow64_NtUnlockVirtualMemory( UINT *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* wow64_NtUnmapViewOfSection
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPI wow64_NtUnmapViewOfSection( UINT *args )
|
||||||
|
{
|
||||||
|
HANDLE process = get_handle( &args );
|
||||||
|
void *addr = get_ptr( &args );
|
||||||
|
|
||||||
|
return NtUnmapViewOfSection( process, addr );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* wow64_NtWriteVirtualMemory
|
* wow64_NtWriteVirtualMemory
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue