Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
458b859d
Commit
458b859d
authored
Jul 27, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the memory mapping syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dffe2bf8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
syscall.h
dlls/wow64/syscall.h
+4
-0
virtual.c
dlls/wow64/virtual.c
+81
-0
No files found.
dlls/wow64/syscall.h
View file @
458b859d
...
...
@@ -28,6 +28,7 @@
SYSCALL_ENTRY( NtAllocateUuids ) \
SYSCALL_ENTRY( NtAllocateVirtualMemory ) \
SYSCALL_ENTRY( NtAllocateVirtualMemoryEx ) \
SYSCALL_ENTRY( NtAreMappedFilesTheSame ) \
SYSCALL_ENTRY( NtCancelTimer ) \
SYSCALL_ENTRY( NtClearEvent ) \
SYSCALL_ENTRY( NtClearPowerRequest ) \
...
...
@@ -62,11 +63,13 @@
SYSCALL_ENTRY( NtFlushVirtualMemory ) \
SYSCALL_ENTRY( NtFreeVirtualMemory ) \
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
SYSCALL_ENTRY( NtGetNlsSectionPtr ) \
SYSCALL_ENTRY( NtListenPort ) \
SYSCALL_ENTRY( NtLoadKey ) \
SYSCALL_ENTRY( NtLoadKey2 ) \
SYSCALL_ENTRY( NtLockVirtualMemory ) \
SYSCALL_ENTRY( NtMakeTemporaryObject ) \
SYSCALL_ENTRY( NtMapViewOfSection ) \
SYSCALL_ENTRY( NtOpenDirectoryObject ) \
SYSCALL_ENTRY( NtOpenEvent ) \
SYSCALL_ENTRY( NtOpenIoCompletion ) \
...
...
@@ -128,6 +131,7 @@
SYSCALL_ENTRY( NtTerminateJobObject ) \
SYSCALL_ENTRY( NtUnloadKey ) \
SYSCALL_ENTRY( NtUnlockVirtualMemory ) \
SYSCALL_ENTRY( NtUnmapViewOfSection ) \
SYSCALL_ENTRY( NtWaitForDebugEvent ) \
SYSCALL_ENTRY( NtWaitForKeyedEvent ) \
SYSCALL_ENTRY( NtWaitForMultipleObjects ) \
...
...
dlls/wow64/virtual.c
View file @
458b859d
...
...
@@ -90,6 +90,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
*/
NTSTATUS
WINAPI
wow64_NtFlushVirtualMemory
(
UINT
*
args
)
...
...
@@ -140,6 +152,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
*/
NTSTATUS
WINAPI
wow64_NtLockVirtualMemory
(
UINT
*
args
)
...
...
@@ -165,6 +203,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
*/
NTSTATUS
WINAPI
wow64_NtProtectVirtualMemory
(
UINT
*
args
)
...
...
@@ -236,6 +305,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
*/
NTSTATUS
WINAPI
wow64_NtWriteVirtualMemory
(
UINT
*
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment