From b79ada3280ffb51bc2e54a608e3cc2eefeb0d1f4 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Mon, 3 Nov 2008 11:46:02 +0000 Subject: [PATCH] - Implement IsWow64Process (based on Wine) svn path=/trunk/; revision=37165 --- reactos/dll/win32/kernel32/misc/stubs.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/kernel32/misc/stubs.c b/reactos/dll/win32/kernel32/misc/stubs.c index 6b752ffa3c4..69aa0effa77 100644 --- a/reactos/dll/win32/kernel32/misc/stubs.c +++ b/reactos/dll/win32/kernel32/misc/stubs.c @@ -532,7 +532,7 @@ IsSystemResumeAutomatic( } /* - * @unimplemented + * @implemented */ BOOL STDCALL @@ -541,8 +541,22 @@ IsWow64Process( PBOOL Wow64Process ) { - STUB; - *Wow64Process = FALSE; + ULONG pbi; + NTSTATUS Status; + + Status = NtQueryInformationProcess(hProcess, + ProcessWow64Information, + &pbi, + sizeof(pbi), + NULL); + + if (Status != STATUS_SUCCESS) + { + SetLastError(RtlNtStatusToDosError(Status)); + return FALSE; + } + + *Wow64Process = (pbi != 0); return TRUE; }