From 3ddf59e1ed62a55f4d4f327eadda91a9a958bc49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 17 Feb 2019 01:10:27 +0100 Subject: [PATCH] [CMLIB] Assign a signature to the in-memory HHIVE registry hive structure. CORE-15753 Makes the `!reg hivelist` WinDbg command working in ReactOS. Dedicated to Mark Jansen. See for more details: https://webcache.googleusercontent.com/search?q=cache:fmHJX9eFGkkJ:https://blogs.technet.microsoft.com/ganand/archive/2008/01/05/internal-structures-of-the-windows-registry.aspx and http://moyix.blogspot.com/2008/02/enumerating-registry-hives.html --- sdk/lib/cmlib/hivedata.h | 1 + sdk/lib/cmlib/hiveinit.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/lib/cmlib/hivedata.h b/sdk/lib/cmlib/hivedata.h index 1c180a6da43..39d617ccbd5 100644 --- a/sdk/lib/cmlib/hivedata.h +++ b/sdk/lib/cmlib/hivedata.h @@ -47,6 +47,7 @@ // // Hive structure identifiers // +#define HV_HHIVE_SIGNATURE 0xbee0bee0 #define HV_HBLOCK_SIGNATURE 0x66676572 // "regf" #define HV_HBIN_SIGNATURE 0x6e696268 // "hbin" diff --git a/sdk/lib/cmlib/hiveinit.c b/sdk/lib/cmlib/hiveinit.c index 297ae360374..fcbbe08961c 100644 --- a/sdk/lib/cmlib/hiveinit.c +++ b/sdk/lib/cmlib/hiveinit.c @@ -542,6 +542,7 @@ HvInitialize( */ RtlZeroMemory(Hive, sizeof(HHIVE)); + Hive->Signature = HV_HHIVE_SIGNATURE; Hive->Allocate = Allocate; Hive->Free = Free; -- 2.17.1