RtlQueryRegistryValues(): Debug dump parameters.
authorshort <>
Mon, 10 Nov 2003 20:24:57 +0000 (20:24 +0000)
committershort <>
Mon, 10 Nov 2003 20:24:57 +0000 (20:24 +0000)
src/libcaptive/cm/rtlfunc.c

index e444a0b..62f4128 100644 (file)
@@ -22,6 +22,7 @@
 #include "reactos/ddk/kefuncs.h"       /* self */
 #include <glib/gmessages.h>
 #include "captive/unicode.h"
+#include "captive/macros.h"
 
 
 /**
@@ -47,10 +48,28 @@ const WCHAR *Path__captive_filesystem_Parameters_ucs2=
                captive_utf8_to_UnicodeString_alloca("\\captive\\filesystem\\Parameters")->Buffer;
 const WCHAR *QueryTable_WritingSupport_Name_ucs2=
                captive_utf8_to_UnicodeString_alloca("WritingSupport")->Buffer;
+const gchar *RelativeTo_table[]={
+               "RTL_REGISTRY_ABSOLUTE",
+               "RTL_REGISTRY_SERVICES",
+               "RTL_REGISTRY_CONTROL",
+               "RTL_REGISTRY_WINDOWS_NT",
+               "RTL_REGISTRY_DEVICEMAP",
+               "RTL_REGISTRY_USER",
+               "RTL_REGISTRY_ENUM",
+               };
+UNICODE_STRING Path_UnicodeString;
 
        g_return_val_if_fail(Path!=NULL,STATUS_INVALID_PARAMETER);
        g_return_val_if_fail(QueryTable!=NULL,STATUS_INVALID_PARAMETER);
-       
+
+       Path_UnicodeString.Length=captive_ucs2_strlen(Path)*sizeof(*Path_UnicodeString.Buffer);
+       Path_UnicodeString.MaximumLength=Path_UnicodeString.Length+sizeof(*Path_UnicodeString.Buffer);
+       Path_UnicodeString.Buffer=(/* de-const */ PWSTR)Path;
+       g_log(G_LOG_DOMAIN,G_LOG_LEVEL_DEBUG,"%s: RelativeTo=%s,Path=%s",G_STRLOC,
+                       (RelativeTo>=0 && RelativeTo<G_N_ELEMENTS(RelativeTo_table)
+                                       ? RelativeTo_table[RelativeTo] : captive_printf_alloca("%lu",(unsigned long)RelativeTo)),
+                                       captive_UnicodeString_to_utf8_alloca(&Path_UnicodeString));
+
        if (RelativeTo==RTL_REGISTRY_ABSOLUTE
                        && captive_ucs2_compare(Path,Path__captive_filesystem_Parameters_ucs2)
                        && QueryTable[0].Name!=NULL