ntdll: Support querying the Wow64 state of other processes.
This commit is contained in:
parent
6056e8a52b
commit
12c90b04dc
@ -71,6 +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 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);
|
||||||
|
@ -307,7 +307,19 @@ NTSTATUS WINAPI NtQueryInformationProcess(
|
|||||||
case ProcessWow64Information:
|
case ProcessWow64Information:
|
||||||
if (ProcessInformationLength == sizeof(DWORD))
|
if (ProcessInformationLength == sizeof(DWORD))
|
||||||
{
|
{
|
||||||
*(DWORD *)ProcessInformation = is_wow64;
|
DWORD val = 0;
|
||||||
|
|
||||||
|
if (ProcessHandle == GetCurrentProcess()) val = is_wow64;
|
||||||
|
else if (server_cpus & (1 << CPU_x86_64))
|
||||||
|
{
|
||||||
|
SERVER_START_REQ( get_process_info )
|
||||||
|
{
|
||||||
|
req->handle = wine_server_obj_handle( ProcessHandle );
|
||||||
|
if (!(ret = wine_server_call( req ))) val = (reply->cpu != CPU_x86_64);
|
||||||
|
}
|
||||||
|
SERVER_END_REQ;
|
||||||
|
}
|
||||||
|
*(DWORD *)ProcessInformation = val;
|
||||||
len = sizeof(DWORD);
|
len = sizeof(DWORD);
|
||||||
}
|
}
|
||||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||||
|
@ -94,7 +94,7 @@ static const enum cpu_type client_cpu = CPU_SPARC;
|
|||||||
#error Unsupported CPU
|
#error Unsupported CPU
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned int server_cpus;
|
unsigned int server_cpus = 0;
|
||||||
int is_wow64 = FALSE;
|
int is_wow64 = FALSE;
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user