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
747d58d2
Commit
747d58d2
authored
Jul 06, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add management of the Wow64 filesystem redirection flag.
parent
4f8ce1b2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
9 deletions
+39
-9
directory.c
dlls/ntdll/directory.c
+23
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-0
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+4
-3
process.c
dlls/ntdll/process.c
+1
-5
server.c
dlls/ntdll/server.c
+7
-1
winternl.h
include/winternl.h
+2
-0
No files found.
dlls/ntdll/directory.c
View file @
747d58d2
...
@@ -2130,6 +2130,29 @@ done:
...
@@ -2130,6 +2130,29 @@ done:
/******************************************************************
/******************************************************************
* RtlWow64EnableFsRedirection (NTDLL.@)
*/
NTSTATUS
WINAPI
RtlWow64EnableFsRedirection
(
BOOLEAN
enable
)
{
if
(
!
is_wow64
)
return
STATUS_NOT_IMPLEMENTED
;
ntdll_get_thread_data
()
->
wow64_redir
=
enable
;
return
STATUS_SUCCESS
;
}
/******************************************************************
* RtlWow64EnableFsRedirectionEx (NTDLL.@)
*/
NTSTATUS
WINAPI
RtlWow64EnableFsRedirectionEx
(
ULONG
enable
,
ULONG
*
old_value
)
{
if
(
!
is_wow64
)
return
STATUS_NOT_IMPLEMENTED
;
*
old_value
=
ntdll_get_thread_data
()
->
wow64_redir
;
ntdll_get_thread_data
()
->
wow64_redir
=
enable
;
return
STATUS_SUCCESS
;
}
/******************************************************************
* RtlDoesFileExists_U (NTDLL.@)
* RtlDoesFileExists_U (NTDLL.@)
*/
*/
BOOLEAN
WINAPI
RtlDoesFileExists_U
(
LPCWSTR
file_name
)
BOOLEAN
WINAPI
RtlDoesFileExists_U
(
LPCWSTR
file_name
)
...
...
dlls/ntdll/ntdll.spec
View file @
747d58d2
...
@@ -913,6 +913,8 @@
...
@@ -913,6 +913,8 @@
@ stdcall -arch=x86_64 RtlVirtualUnwind(long long long ptr ptr ptr ptr ptr)
@ stdcall -arch=x86_64 RtlVirtualUnwind(long long long ptr ptr ptr ptr ptr)
@ stub RtlWalkFrameChain
@ stub RtlWalkFrameChain
@ stdcall RtlWalkHeap(long ptr)
@ stdcall RtlWalkHeap(long ptr)
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
@ stub RtlWriteMemoryStream
@ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap
@ stub RtlZeroHeap
...
...
dlls/ntdll/ntdll_misc.h
View file @
747d58d2
...
@@ -71,7 +71,7 @@ extern void virtual_init_threading(void);
...
@@ -71,7 +71,7 @@ extern void virtual_init_threading(void);
/* server support */
/* server support */
extern
timeout_t
server_start_time
;
extern
timeout_t
server_start_time
;
extern
unsigned
int
server_cpus
;
extern
int
is_wow64
;
extern
void
server_init_process
(
void
);
extern
void
server_init_process
(
void
);
extern
NTSTATUS
server_init_process_done
(
void
);
extern
NTSTATUS
server_init_process_done
(
void
);
extern
size_t
server_init_thread
(
void
*
entry_point
);
extern
size_t
server_init_thread
(
void
*
entry_point
);
...
@@ -198,8 +198,9 @@ struct ntdll_thread_data
...
@@ -198,8 +198,9 @@ struct ntdll_thread_data
int
request_fd
;
/* 1e0/310 fd for sending server requests */
int
request_fd
;
/* 1e0/310 fd for sending server requests */
int
reply_fd
;
/* 1e4/314 fd for receiving server replies */
int
reply_fd
;
/* 1e4/314 fd for receiving server replies */
int
wait_fd
[
2
];
/* 1e8/318 fd for sleeping server requests */
int
wait_fd
[
2
];
/* 1e8/318 fd for sleeping server requests */
void
*
vm86_ptr
;
/* 1f0/320 data for vm86 mode */
BOOL
wow64_redir
;
/* 1f0/320 Wow64 filesystem redirection flag */
pthread_t
pthread_id
;
/* 1f4/328 pthread thread id */
void
*
vm86_ptr
;
/* 1f4/328 data for vm86 mode */
pthread_t
pthread_id
;
/* 1f8/330 pthread thread id */
};
};
static
inline
struct
ntdll_thread_data
*
ntdll_get_thread_data
(
void
)
static
inline
struct
ntdll_thread_data
*
ntdll_get_thread_data
(
void
)
...
...
dlls/ntdll/process.c
View file @
747d58d2
...
@@ -307,11 +307,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
...
@@ -307,11 +307,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
case
ProcessWow64Information
:
case
ProcessWow64Information
:
if
(
ProcessInformationLength
==
sizeof
(
DWORD
))
if
(
ProcessInformationLength
==
sizeof
(
DWORD
))
{
{
#ifdef __i386__
*
(
DWORD
*
)
ProcessInformation
=
is_wow64
;
*
(
DWORD
*
)
ProcessInformation
=
(
server_cpus
&
(
1
<<
CPU_x86_64
))
!=
0
;
#else
*
(
DWORD
*
)
ProcessInformation
=
FALSE
;
#endif
len
=
sizeof
(
DWORD
);
len
=
sizeof
(
DWORD
);
}
}
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
...
...
dlls/ntdll/server.c
View file @
747d58d2
...
@@ -94,7 +94,8 @@ static const enum cpu_type client_cpu = CPU_SPARC;
...
@@ -94,7 +94,8 @@ static const enum cpu_type client_cpu = CPU_SPARC;
#error Unsupported CPU
#error Unsupported CPU
#endif
#endif
unsigned
int
server_cpus
=
0
;
static
unsigned
int
server_cpus
;
int
is_wow64
=
FALSE
;
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
/* data structure used to pass an fd with sendmsg/recvmsg */
/* data structure used to pass an fd with sendmsg/recvmsg */
...
@@ -1081,6 +1082,11 @@ size_t server_init_thread( void *entry_point )
...
@@ -1081,6 +1082,11 @@ size_t server_init_thread( void *entry_point )
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
#ifndef _WIN64
is_wow64
=
(
server_cpus
&
(
1
<<
CPU_x86_64
))
!=
0
;
#endif
ntdll_get_thread_data
()
->
wow64_redir
=
is_wow64
;
if
(
ret
)
if
(
ret
)
{
{
if
(
ret
==
STATUS_NOT_SUPPORTED
)
if
(
ret
==
STATUS_NOT_SUPPORTED
)
...
...
include/winternl.h
View file @
747d58d2
...
@@ -2512,6 +2512,8 @@ NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
...
@@ -2512,6 +2512,8 @@ NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID);
NTSYSAPI
BOOLEAN
WINAPI
RtlValidateHeap
(
HANDLE
,
ULONG
,
LPCVOID
);
NTSYSAPI
BOOLEAN
WINAPI
RtlValidateHeap
(
HANDLE
,
ULONG
,
LPCVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlVerifyVersionInfo
(
const
RTL_OSVERSIONINFOEXW
*
,
DWORD
,
DWORDLONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlVerifyVersionInfo
(
const
RTL_OSVERSIONINFOEXW
*
,
DWORD
,
DWORDLONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWalkHeap
(
HANDLE
,
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWalkHeap
(
HANDLE
,
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWow64EnableFsRedirection
(
BOOLEAN
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWow64EnableFsRedirectionEx
(
ULONG
,
ULONG
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWriteRegistryValue
(
ULONG
,
PCWSTR
,
PCWSTR
,
ULONG
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlWriteRegistryValue
(
ULONG
,
PCWSTR
,
PCWSTR
,
ULONG
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlpNtCreateKey
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
ULONG
,
const
UNICODE_STRING
*
,
ULONG
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlpNtCreateKey
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
ULONG
,
const
UNICODE_STRING
*
,
ULONG
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlpNtEnumerateSubKey
(
HANDLE
,
UNICODE_STRING
*
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlpNtEnumerateSubKey
(
HANDLE
,
UNICODE_STRING
*
,
ULONG
);
...
...
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