From 6da719aa66c53cbd71a066491cc09bc352c1768a Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 20 Feb 2011 11:27:07 +0000 Subject: [PATCH] [NTOSKRNL] Halfplement (win32 only) ProcessWow64Information case in NtQueryInformationProcess. Patch by Samuel Serapion. See issue #5916 for more details. svn path=/trunk/; revision=50831 --- reactos/ntoskrnl/ps/query.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ps/query.c b/reactos/ntoskrnl/ps/query.c index 342c818945e..6b6c2681186 100644 --- a/reactos/ntoskrnl/ps/query.c +++ b/reactos/ntoskrnl/ps/query.c @@ -469,11 +469,26 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, NULL); if (!NT_SUCCESS(Status)) break; - DPRINT1("Not implemented: ProcessWow64Information\n"); + /* Protect write in SEH */ + _SEH2_TRY + { +#ifdef _WIN64 + DPRINT1("Not implemented: ProcessWow64Information\n"); + Status = STATUS_NOT_IMPLEMENTED; +#else + /* Wow64 not present */ + *(PULONG_PTR)ProcessInformation = 0; +#endif + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + /* Get the exception code */ + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; /* Dereference the process */ ObDereferenceObject(Process); - Status = STATUS_NOT_IMPLEMENTED; break; /* Virtual Memory Statistics */ -- 2.17.1