[CMLIB] Assign a signature to the in-memory HHIVE registry hive structure. CORE-15753
[reactos.git] / sdk / lib / cmlib / hivedata.h
index 4ac381b..39d617c 100644 (file)
 #define HSECTOR_COUNT                   8
 
 #define HV_LOG_HEADER_SIZE              FIELD_OFFSET(HBASE_BLOCK, Reserved2)
-#define HV_SIGNATURE                    0x66676572  // "regf"
-#define HV_BIN_SIGNATURE                0x6e696268  // "hbin"
+
+//
+// Hive structure identifiers
+//
+#define HV_HHIVE_SIGNATURE              0xbee0bee0
+#define HV_HBLOCK_SIGNATURE             0x66676572  // "regf"
+#define HV_HBIN_SIGNATURE               0x6e696268  // "hbin"
 
 //
 // Hive versions
@@ -110,7 +115,7 @@ typedef enum
 
 typedef struct _HBASE_BLOCK
 {
-    /* Hive identifier "regf" (0x66676572) */
+    /* Hive base block identifier "regf" (0x66676572) */
     ULONG Signature;
 
     /* Update counters */
@@ -161,7 +166,7 @@ C_ASSERT(sizeof(HBASE_BLOCK) == HBLOCK_SIZE);
 
 typedef struct _HBIN
 {
-    /* Bin identifier "hbin" (0x6E696268) */
+    /* Hive bin identifier "hbin" (0x6E696268) */
     ULONG Signature;
 
     /* Block offset of this bin */
@@ -279,7 +284,10 @@ typedef struct _DUAL
 
 typedef struct _HHIVE
 {
+    /* Hive identifier (0xBEE0BEE0) */
     ULONG Signature;
+
+    /* Callbacks */
     PGET_CELL_ROUTINE GetCellRoutine;
     PRELEASE_CELL_ROUTINE ReleaseCellRoutine;
     PALLOCATE_ROUTINE Allocate;
@@ -288,6 +296,7 @@ typedef struct _HHIVE
     PFILE_WRITE_ROUTINE FileWrite;
     PFILE_READ_ROUTINE FileRead;
     PFILE_FLUSH_ROUTINE FileFlush;
+
 #if (NTDDI_VERSION >= NTDDI_WIN7)
     PVOID HiveLoadFailure; // PHIVE_LOAD_FAILURE
 #endif