update for HEAD-2003021201
[reactos.git] / ntoskrnl / cm / rtlfunc.c
index 4c68311..7e36694 100644 (file)
@@ -6,6 +6,11 @@
  * UPDATE HISTORY:
 */
 
+/* INCLUDES *****************************************************************/
+
+#ifdef WIN32_REGDBG
+#include "cm_win32.h"
+#else
 #include <ddk/ntddk.h>
 #include <roscfg.h>
 #include <internal/ob.h>
 #include <internal/debug.h>
 
 #include "cm.h"
+#endif
+
+
+/* FUNCTIONS ****************************************************************/
 
 NTSTATUS STDCALL
 RtlCheckRegistryKey(IN ULONG RelativeTo,
@@ -145,6 +154,10 @@ RtlQueryRegistryValues(IN ULONG RelativeTo,
   PWSTR StringPtr;
 
   DPRINT("RtlQueryRegistryValues() called\n");
+#ifdef WIN32_REGDBG
+  BaseKeyHandle = NULL;
+  CurrentKeyHandle = NULL;
+#endif
 
   Status = RtlpGetRegistryHandle(RelativeTo,
                                 Path,
@@ -182,7 +195,7 @@ RtlQueryRegistryValues(IN ULONG RelativeTo,
     ParamTable[1].DefaultType = REG_MULTI_SZ;
 
     Status = RtlQueryRegistryValues(
-                  IN ULONG RelativeTo = RTL_REGISTRY_ABSOLUTE,
+               IN ULONG RelativeTo = RTL_REGISTRY_ABSOLUTE,
                IN PWSTR Path = Path,
                IN PRTL_QUERY_REGISTRY_TABLE QueryTable = ParamTable,
                IN PVOID Context = NULL,
@@ -241,7 +254,9 @@ RtlQueryRegistryValues(IN ULONG RelativeTo,
              Status = STATUS_NO_MEMORY;
              break;
            }
-
+#ifdef WIN32_REGDBG
+      memset(ValueInfo, 0, BufferSize);
+#endif
          Status = ZwQueryValueKey(CurrentKeyHandle,
                                   &KeyName,
                                   KeyValuePartialInformation,
@@ -466,7 +481,11 @@ RtlQueryRegistryValues(IN ULONG RelativeTo,
                      !(QueryEntry->Flags & RTL_QUERY_REGISTRY_NOEXPAND))
                    {
                      DPRINT("Expand REG_MULTI_SZ type\n");
+#ifdef WIN32_REGDBG
+                     StringPtr = (PWSTR)(FullValueInfo + FullValueInfo->DataOffset);
+#else
                      StringPtr = (PWSTR)((PVOID)FullValueInfo + FullValueInfo->DataOffset);
+#endif
                      while (*StringPtr != 0)
                        {
                          StringLen = (wcslen(StringPtr) + 1) * sizeof(WCHAR);
@@ -485,7 +504,11 @@ RtlQueryRegistryValues(IN ULONG RelativeTo,
                    {
                      Status = QueryEntry->QueryRoutine(FullValueInfo->Name,
                                                        FullValueInfo->Type,
+#ifdef WIN32_REGDBG
+                                                       FullValueInfo + FullValueInfo->DataOffset,
+#else
                                                        (PVOID)FullValueInfo + FullValueInfo->DataOffset,
+#endif
                                                        FullValueInfo->DataLength,
                                                        Context,
                                                        QueryEntry->EntryContext);