From bdb5b824b5a48e57aaf3775920763d050fefbcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 24 Oct 2003 21:38:33 +0000 Subject: [PATCH] Bail out of RtlQueryRegistryValues if RTL_QUERY_REGISTRY_REQUIRED specified and value not found svn path=/trunk/; revision=6425 --- reactos/ntoskrnl/cm/rtlfunc.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/cm/rtlfunc.c b/reactos/ntoskrnl/cm/rtlfunc.c index 4e1a40215b6..32d8ffb8f95 100644 --- a/reactos/ntoskrnl/cm/rtlfunc.c +++ b/reactos/ntoskrnl/cm/rtlfunc.c @@ -459,12 +459,15 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, &ResultSize); if (!NT_SUCCESS(Status)) { - Status = QueryEntry->QueryRoutine(QueryEntry->Name, - QueryEntry->DefaultType, - QueryEntry->DefaultData, - QueryEntry->DefaultLength, - Context, - QueryEntry->EntryContext); + if (! (QueryEntry->Flags & RTL_QUERY_REGISTRY_REQUIRED)) + { + Status = QueryEntry->QueryRoutine(QueryEntry->Name, + QueryEntry->DefaultType, + QueryEntry->DefaultData, + QueryEntry->DefaultLength, + Context, + QueryEntry->EntryContext); + } } else if ((ValueInfo->Type == REG_MULTI_SZ) && !(QueryEntry->Flags & RTL_QUERY_REGISTRY_NOEXPAND))