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
c12abcc2
Commit
c12abcc2
authored
Jul 28, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the file set information syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f1d88841
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
0 deletions
+129
-0
file.c
dlls/wow64/file.c
+112
-0
struct32.h
dlls/wow64/struct32.h
+14
-0
syscall.h
dlls/wow64/syscall.h
+3
-0
No files found.
dlls/wow64/file.c
View file @
c12abcc2
...
...
@@ -27,6 +27,9 @@
#include "winnt.h"
#include "winternl.h"
#include "wow64_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wow
);
/**********************************************************************
...
...
@@ -316,6 +319,115 @@ NTSTATUS WINAPI wow64_NtReadFileScatter( UINT *args )
/**********************************************************************
* wow64_NtSetEaFile
*/
NTSTATUS
WINAPI
wow64_NtSetEaFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
void
*
ptr
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtSetEaFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
ptr
,
len
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtSetInformationFile
*/
NTSTATUS
WINAPI
wow64_NtSetInformationFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
void
*
ptr
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
FILE_INFORMATION_CLASS
class
=
get_ulong
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
switch
(
class
)
{
case
FileBasicInformation
:
/* FILE_BASIC_INFORMATION */
case
FilePositionInformation
:
/* FILE_POSITION_INFORMATION */
case
FileEndOfFileInformation
:
/* FILE_END_OF_FILE_INFORMATION */
case
FilePipeInformation
:
/* FILE_PIPE_INFORMATION */
case
FileMailslotSetInformation
:
/* FILE_MAILSLOT_SET_INFORMATION */
case
FileIoCompletionNotificationInformation
:
/* FILE_IO_COMPLETION_NOTIFICATION_INFORMATION */
case
FileIoPriorityHintInformation
:
/* FILE_IO_PRIORITY_HINT_INFO */
case
FileValidDataLengthInformation
:
/* FILE_VALID_DATA_LENGTH_INFORMATION */
case
FileDispositionInformation
:
/* FILE_DISPOSITION_INFORMATION */
status
=
NtSetInformationFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
ptr
,
len
,
class
);
break
;
case
FileRenameInformation
:
/* FILE_RENAME_INFORMATION */
case
FileLinkInformation
:
/* FILE_LINK_INFORMATION */
if
(
len
>=
sizeof
(
FILE_RENAME_INFORMATION32
))
{
FILE_RENAME_INFORMATION32
*
info32
=
ptr
;
FILE_RENAME_INFORMATION
*
info
;
ULONG
size
;
size
=
offsetof
(
FILE_RENAME_INFORMATION
,
FileName
[
info32
->
FileNameLength
/
sizeof
(
WCHAR
)]
);
info
=
Wow64AllocateTemp
(
size
);
info
->
ReplaceIfExists
=
info32
->
ReplaceIfExists
;
info
->
RootDirectory
=
LongToHandle
(
info32
->
RootDirectory
);
info
->
FileNameLength
=
info32
->
FileNameLength
;
memcpy
(
info
->
FileName
,
info32
->
FileName
,
info
->
FileNameLength
);
status
=
NtSetInformationFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
info
,
size
,
class
);
}
else
status
=
io
.
Status
=
STATUS_INVALID_PARAMETER_3
;
break
;
case
FileCompletionInformation
:
/* FILE_COMPLETION_INFORMATION */
if
(
len
>=
sizeof
(
FILE_COMPLETION_INFORMATION32
))
{
FILE_COMPLETION_INFORMATION32
*
info32
=
ptr
;
FILE_COMPLETION_INFORMATION
info
;
info
.
CompletionPort
=
LongToHandle
(
info32
->
CompletionPort
);
info
.
CompletionKey
=
info32
->
CompletionKey
;
status
=
NtSetInformationFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
&
info
,
sizeof
(
info
),
class
);
}
else
status
=
io
.
Status
=
STATUS_INVALID_PARAMETER_3
;
break
;
default:
FIXME
(
"unsupported class %u
\n
"
,
class
);
status
=
io
.
Status
=
STATUS_INVALID_INFO_CLASS
;
break
;
}
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtSetVolumeInformationFile
*/
NTSTATUS
WINAPI
wow64_NtSetVolumeInformationFile
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
IO_STATUS_BLOCK32
*
io32
=
get_ptr
(
&
args
);
void
*
ptr
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
FS_INFORMATION_CLASS
class
=
get_ulong
(
&
args
);
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtSetVolumeInformationFile
(
handle
,
iosb_32to64
(
&
io
,
io32
),
ptr
,
len
,
class
);
put_iosb
(
io32
,
&
io
);
return
status
;
}
/**********************************************************************
* wow64_NtUnlockFile
*/
NTSTATUS
WINAPI
wow64_NtUnlockFile
(
UINT
*
args
)
...
...
dlls/wow64/struct32.h
View file @
c12abcc2
...
...
@@ -81,6 +81,20 @@ typedef struct
typedef
struct
{
ULONG
CompletionPort
;
ULONG
CompletionKey
;
}
FILE_COMPLETION_INFORMATION32
;
typedef
struct
{
BOOLEAN
ReplaceIfExists
;
ULONG
RootDirectory
;
ULONG
FileNameLength
;
WCHAR
FileName
[
1
];
}
FILE_RENAME_INFORMATION32
;
typedef
struct
{
ULONG
BaseAddress
;
ULONG
AllocationBase
;
DWORD
AllocationProtect
;
...
...
dlls/wow64/syscall.h
View file @
c12abcc2
...
...
@@ -134,8 +134,10 @@
SYSCALL_ENTRY( NtSecureConnectPort ) \
SYSCALL_ENTRY( NtSetDefaultLocale ) \
SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
SYSCALL_ENTRY( NtSetEaFile ) \
SYSCALL_ENTRY( NtSetEvent ) \
SYSCALL_ENTRY( NtSetInformationDebugObject ) \
SYSCALL_ENTRY( NtSetInformationFile ) \
SYSCALL_ENTRY( NtSetInformationKey ) \
SYSCALL_ENTRY( NtSetInformationObject ) \
SYSCALL_ENTRY( NtSetIoCompletion ) \
...
...
@@ -143,6 +145,7 @@
SYSCALL_ENTRY( NtSetTimer ) \
SYSCALL_ENTRY( NtSetTimerResolution ) \
SYSCALL_ENTRY( NtSetValueKey ) \
SYSCALL_ENTRY( NtSetVolumeInformationFile ) \
SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
SYSCALL_ENTRY( NtTerminateJobObject ) \
SYSCALL_ENTRY( NtUnloadKey ) \
...
...
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