r26520: More Python updates.
[ira/wip.git] / source / lib / registry / registry.i
index 784462c368654e15f68ca1aa837bf8eafe1d4508..1819e7df80e21d87d63c1aafbc48c271fa93fb29 100644 (file)
@@ -104,6 +104,18 @@ typedef struct registry_context {
 
     WERROR mount_hive(struct hive_key *hive_key, uint32_t hkey_id,
                       const char **elements=NULL);
+
+    WERROR mount_hive(struct hive_key *hive_key, const char *predef_name)
+    {
+        int i;
+        for (i = 0; reg_predefined_keys[i].name; i++) {
+            if (!strcasecmp(reg_predefined_keys[i].name, predef_name))
+                return reg_mount_hive($self, hive_key, 
+                                      reg_predefined_keys[i].handle, NULL);
+        }
+        return WERR_INVALID_NAME;
+        }
+
     }
 } reg;