From 2ff07f4497c9090fdac917b13a6dec63fed47551 Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Wed, 5 May 2004 02:00:01 +0000 Subject: [PATCH] Return reasonably correct result querying a null memory area. Still a TODO left. svn path=/trunk/; revision=9308 --- reactos/ntoskrnl/mm/virtual.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index b6c586d4b8e..6b7af5c5831 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: virtual.c,v 1.72 2004/04/10 22:35:26 gdalsnes Exp $ +/* $Id: virtual.c,v 1.73 2004/05/05 02:00:01 tamlin Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/virtual.c @@ -157,6 +157,15 @@ NtQueryVirtualMemory (IN HANDLE ProcessHandle, { Info->State = MEM_FREE; Info->BaseAddress = (PVOID)PAGE_ROUND_DOWN(Address); + Info->AllocationBase = 0; + Info->AllocationProtect = 0; + /* TODO: Find the next memory area and set RegionSize! */ + /* Since programs might depend on RegionSize for + * iteration, we for now just make up a value. + */ + Info->RegionSize = (Address > (PVOID)0x70000000) ? 0 : 0x10000; + Info->Protect = PAGE_NOACCESS; + Info->Type = 0; Status = STATUS_SUCCESS; ResultLength = sizeof(MEMORY_BASIC_INFORMATION); }