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
668b1829
Commit
668b1829
authored
Jul 28, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the file I/O syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
01ad0993
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
170 additions
and
0 deletions
+170
-0
file.c
dlls/wow64/file.c
+163
-0
syscall.h
dlls/wow64/syscall.h
+7
-0
No files found.
dlls/wow64/file.c
View file @
668b1829
...
...
@@ -75,6 +75,49 @@ NTSTATUS WINAPI wow64_NtDeleteFile( UINT *args )
/**********************************************************************
* wow64_NtFlushBuffersFile
*/
NTSTATUS
WINAPI
wow64_NtFlushBuffersFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtFlushBuffersFile
(
handle
,
iosb_32to64
(
&
io
,
io32
));
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtLockFile
*/
NTSTATUS
WINAPI
wow64_NtLockFile
(
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
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
LARGE_INTEGER
*
count
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
BOOLEAN
dont_wait
=
get_ulong
(
&
args
);
BOOLEAN
exclusive
=
get_ulong
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtLockFile
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
offset
,
count
,
key
,
dont_wait
,
exclusive
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtOpenFile
*/
NTSTATUS
WINAPI
wow64_NtOpenFile
(
UINT
*
args
)
...
...
@@ -98,3 +141,123 @@ NTSTATUS WINAPI wow64_NtOpenFile( UINT *args )
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtReadFile
*/
NTSTATUS
WINAPI
wow64_NtReadFile
(
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
);
void
*
buffer
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtReadFile
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
buffer
,
len
,
offset
,
key
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtReadFileScatter
*/
NTSTATUS
WINAPI
wow64_NtReadFileScatter
(
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
);
FILE_SEGMENT_ELEMENT
*
segments
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtReadFileScatter
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
segments
,
len
,
offset
,
key
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtUnlockFile
*/
NTSTATUS
WINAPI
wow64_NtUnlockFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
LARGE_INTEGER
*
count
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtUnlockFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
offset
,
count
,
key
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtWriteFile
*/
NTSTATUS
WINAPI
wow64_NtWriteFile
(
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
);
void
*
buffer
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtWriteFile
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
buffer
,
len
,
offset
,
key
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtWriteFileGather
*/
NTSTATUS
WINAPI
wow64_NtWriteFileGather
(
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
);
FILE_SEGMENT_ELEMENT
*
segments
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
LARGE_INTEGER
*
offset
=
get_ptr
(
&
args
);
ULONG
*
key
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtWriteFileGather
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
segments
,
len
,
offset
,
key
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
dlls/wow64/syscall.h
View file @
668b1829
...
...
@@ -61,6 +61,7 @@
SYSCALL_ENTRY( NtEnumerateKey ) \
SYSCALL_ENTRY( NtEnumerateValueKey ) \
SYSCALL_ENTRY( NtFindAtom ) \
SYSCALL_ENTRY( NtFlushBuffersFile ) \
SYSCALL_ENTRY( NtFlushKey ) \
SYSCALL_ENTRY( NtFlushVirtualMemory ) \
SYSCALL_ENTRY( NtFreeVirtualMemory ) \
...
...
@@ -70,6 +71,7 @@
SYSCALL_ENTRY( NtListenPort ) \
SYSCALL_ENTRY( NtLoadKey ) \
SYSCALL_ENTRY( NtLoadKey2 ) \
SYSCALL_ENTRY( NtLockFile ) \
SYSCALL_ENTRY( NtLockVirtualMemory ) \
SYSCALL_ENTRY( NtMakeTemporaryObject ) \
SYSCALL_ENTRY( NtMapViewOfSection ) \
...
...
@@ -109,6 +111,8 @@
SYSCALL_ENTRY( NtQueryTimerResolution ) \
SYSCALL_ENTRY( NtQueryValueKey ) \
SYSCALL_ENTRY( NtQueryVirtualMemory ) \
SYSCALL_ENTRY( NtReadFile ) \
SYSCALL_ENTRY( NtReadFileScatter ) \
SYSCALL_ENTRY( NtReadVirtualMemory ) \
SYSCALL_ENTRY( NtReleaseKeyedEvent ) \
SYSCALL_ENTRY( NtReleaseMutant ) \
...
...
@@ -136,6 +140,7 @@
SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
SYSCALL_ENTRY( NtTerminateJobObject ) \
SYSCALL_ENTRY( NtUnloadKey ) \
SYSCALL_ENTRY( NtUnlockFile ) \
SYSCALL_ENTRY( NtUnlockVirtualMemory ) \
SYSCALL_ENTRY( NtUnmapViewOfSection ) \
SYSCALL_ENTRY( NtWaitForDebugEvent ) \
...
...
@@ -145,6 +150,8 @@
SYSCALL_ENTRY( NtWow64AllocateVirtualMemory64 ) \
SYSCALL_ENTRY( NtWow64ReadVirtualMemory64 ) \
SYSCALL_ENTRY( NtWow64WriteVirtualMemory64 ) \
SYSCALL_ENTRY( NtWriteFile ) \
SYSCALL_ENTRY( NtWriteFileGather ) \
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtYieldExecution )
...
...
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