Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
011ce0b2
Commit
011ce0b2
authored
Jul 28, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the file async I/O syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c12abcc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
0 deletions
+127
-0
file.c
dlls/wow64/file.c
+115
-0
struct32.h
dlls/wow64/struct32.h
+7
-0
syscall.h
dlls/wow64/syscall.h
+5
-0
No files found.
dlls/wow64/file.c
View file @
011ce0b2
...
...
@@ -33,6 +33,41 @@ WINE_DEFAULT_DEBUG_CHANNEL(wow);
/**********************************************************************
* wow64_NtCancelIoFile
*/
NTSTATUS
WINAPI
wow64_NtCancelIoFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtCancelIoFile
(
handle
,
iosb_32to64
(
&
io
,
io32
));
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtCancelIoFileEx
*/
NTSTATUS
WINAPI
wow64_NtCancelIoFileEx
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io_ptr
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtCancelIoFileEx
(
handle
,
(
IO_STATUS_BLOCK
*
)
io_ptr
,
iosb_32to64
(
&
io
,
io32
));
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtCreateFile
*/
NTSTATUS
WINAPI
wow64_NtCreateFile
(
UINT
*
args
)
...
...
@@ -121,6 +156,32 @@ NTSTATUS WINAPI wow64_NtLockFile( UINT *args )
/**********************************************************************
* wow64_NtNotifyChangeDirectoryFile
*/
NTSTATUS
WINAPI
wow64_NtNotifyChangeDirectoryFile
(
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
);
ULONG
filter
=
get_ulong
(
&
args
);
BOOLEAN
subtree
=
get_ulong
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtNotifyChangeDirectoryFile
(
handle
,
event
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
iosb_32to64
(
&
io
,
io32
),
buffer
,
len
,
filter
,
subtree
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtOpenFile
*/
NTSTATUS
WINAPI
wow64_NtOpenFile
(
UINT
*
args
)
...
...
@@ -319,6 +380,60 @@ NTSTATUS WINAPI wow64_NtReadFileScatter( UINT *args )
/**********************************************************************
* wow64_NtRemoveIoCompletion
*/
NTSTATUS
WINAPI
wow64_NtRemoveIoCompletion
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
ULONG
*
key_ptr
=
get_ptr
(
&
args
);
ULONG
*
value_ptr
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
LARGE_INTEGER
*
timeout
=
get_ptr
(
&
args
);
IO_STATUS_BLOCK
io
;
ULONG_PTR
key
,
value
;
NTSTATUS
status
;
status
=
NtRemoveIoCompletion
(
handle
,
&
key
,
&
value
,
iosb_32to64
(
&
io
,
io32
),
timeout
);
if
(
!
status
)
{
*
key_ptr
=
key
;
*
value_ptr
=
value
;
}
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtRemoveIoCompletionEx
*/
NTSTATUS
WINAPI
wow64_NtRemoveIoCompletionEx
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
FILE_IO_COMPLETION_INFORMATION32
*
info32
=
get_ptr
(
&
args
);
ULONG
count
=
get_ulong
(
&
args
);
ULONG
*
written
=
get_ptr
(
&
args
);
LARGE_INTEGER
*
timeout
=
get_ptr
(
&
args
);
BOOLEAN
alertable
=
get_ulong
(
&
args
);
NTSTATUS
status
;
ULONG
i
;
FILE_IO_COMPLETION_INFORMATION
*
info
=
Wow64AllocateTemp
(
count
*
sizeof
(
*
info
)
);
status
=
NtRemoveIoCompletionEx
(
handle
,
info
,
count
,
written
,
timeout
,
alertable
);
for
(
i
=
0
;
i
<
*
written
;
i
++
)
{
info32
[
i
].
CompletionKey
=
info
[
i
].
CompletionKey
;
info32
[
i
].
CompletionValue
=
info
[
i
].
CompletionValue
;
info32
[
i
].
IoStatusBlock
.
Status
=
info
[
i
].
IoStatusBlock
.
Status
;
info32
[
i
].
IoStatusBlock
.
Information
=
info
[
i
].
IoStatusBlock
.
Information
;
}
return
status
;
}
/**********************************************************************
* wow64_NtSetEaFile
*/
NTSTATUS
WINAPI
wow64_NtSetEaFile
(
UINT
*
args
)
...
...
dlls/wow64/struct32.h
View file @
011ce0b2
...
...
@@ -87,6 +87,13 @@ typedef struct
typedef
struct
{
ULONG
CompletionKey
;
ULONG
CompletionValue
;
IO_STATUS_BLOCK32
IoStatusBlock
;
}
FILE_IO_COMPLETION_INFORMATION32
;
typedef
struct
{
BOOLEAN
ReplaceIfExists
;
ULONG
RootDirectory
;
ULONG
FileNameLength
;
...
...
dlls/wow64/syscall.h
View file @
011ce0b2
...
...
@@ -29,6 +29,8 @@
SYSCALL_ENTRY( NtAllocateVirtualMemory ) \
SYSCALL_ENTRY( NtAllocateVirtualMemoryEx ) \
SYSCALL_ENTRY( NtAreMappedFilesTheSame ) \
SYSCALL_ENTRY( NtCancelIoFile ) \
SYSCALL_ENTRY( NtCancelIoFileEx ) \
SYSCALL_ENTRY( NtCancelTimer ) \
SYSCALL_ENTRY( NtClearEvent ) \
SYSCALL_ENTRY( NtClearPowerRequest ) \
...
...
@@ -75,6 +77,7 @@
SYSCALL_ENTRY( NtLockVirtualMemory ) \
SYSCALL_ENTRY( NtMakeTemporaryObject ) \
SYSCALL_ENTRY( NtMapViewOfSection ) \
SYSCALL_ENTRY( NtNotifyChangeDirectoryFile ) \
SYSCALL_ENTRY( NtOpenDirectoryObject ) \
SYSCALL_ENTRY( NtOpenEvent ) \
SYSCALL_ENTRY( NtOpenFile ) \
...
...
@@ -123,6 +126,8 @@
SYSCALL_ENTRY( NtReleaseKeyedEvent ) \
SYSCALL_ENTRY( NtReleaseMutant ) \
SYSCALL_ENTRY( NtReleaseSemaphore ) \
SYSCALL_ENTRY( NtRemoveIoCompletion ) \
SYSCALL_ENTRY( NtRemoveIoCompletionEx ) \
SYSCALL_ENTRY( NtRenameKey ) \
SYSCALL_ENTRY( NtReplaceKey ) \
SYSCALL_ENTRY( NtReplyWaitReceivePort ) \
...
...
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