From decca5781ac78dc5a34974dab3f04219cc40d58f Mon Sep 17 00:00:00 2001 From: David Welch Date: Thu, 27 Sep 2001 02:14:35 +0000 Subject: [PATCH] Fixes. svn path=/trunk/; revision=2261 --- reactos/ntoskrnl/io/resource.c | 48 ++++++++++++++++++++++++++++++++-- reactos/ntoskrnl/mm/virtual.c | 5 ++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/io/resource.c b/reactos/ntoskrnl/io/resource.c index 2a87fef3c47..f31a2c7957c 100644 --- a/reactos/ntoskrnl/io/resource.c +++ b/reactos/ntoskrnl/io/resource.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: resource.c,v 1.7 2001/09/05 09:21:47 ekohl Exp $ +/* $Id: resource.c,v 1.8 2001/09/27 02:14:34 dwelch Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/resource.c @@ -103,7 +103,51 @@ IoQueryDeviceDescription(PINTERFACE_TYPE BusType, PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, PVOID Context) { - UNIMPLEMENTED; +#if 0 + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS Status; + PWCH BaseKeyName[] = + L"\\Registry\\Machine\\Hardware\\MultifunctionAdapter\\0"; + HANDLE BaseKeyHandle; + ULONG i; + struct + { + KEY_BASIC_INFORMATION BasicInfo; + WCH Name[255]; + } BasicInfo; + + BaseKeyName = L"\\Registry\\Machine\\Hardware\\MultifunctionAdapter"; + InitializeObjectAttributes(&ObjectAttributes, + BaseKeyName, + 0, + NULL, + NULL); + Status = ZwOpenKey(&BaseKeyHandle, + KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEY, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + return(Status); + } + + i = 0; + for (;;) + { + Status = ZwEnumerateKey(BaseKeyHandle, + i, + KeyBasicInformation, + &BasicInfo, + sizeof(BasicInfo), + &ResultLength); + if (!NT_SUCCESS(Status)) + { + break; + } + + + } +#endif + return(STATUS_NOT_IMPLEMENTED); } NTSTATUS STDCALL diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index 07773ff721a..5631058b2f3 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -1,4 +1,4 @@ -/* $Id: virtual.c,v 1.48 2001/08/07 14:07:33 ekohl Exp $ +/* $Id: virtual.c,v 1.49 2001/09/27 02:14:35 dwelch Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -890,7 +890,8 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle, if (((AllocationType & (MEM_COMMIT | MEM_RESERVE)) == MEM_COMMIT) && (*UBaseAddress == 0)) { - return(STATUS_INVALID_PARAMETER); + /* Fix for badly behaved vc applications. */ + AllocationType |= MEM_RESERVE; } PBaseAddress = *UBaseAddress;