16#define HINIT_MEMORY_INPLACE 3
18#define HINIT_MAPFILE 5
23#define HIVE_VOLATILE 1
24#define HIVE_NOLAZYFLUSH 2
25#define HIVE_HAS_BEEN_REPLACED 4
26#define HIVE_HAS_BEEN_FREED 8
27#define HIVE_UNKNOWN 0x10
28#define HIVE_IS_UNLOADING 0x20
33#define HFILE_TYPE_PRIMARY 0
34#define HFILE_TYPE_LOG 1
35#define HFILE_TYPE_EXTERNAL 2
36#define HFILE_TYPE_ALTERNATE 3
37#define HFILE_TYPE_MAX 4
42#define HBLOCK_SIZE 0x1000
43#define HSECTOR_SIZE 0x200
44#define HSECTOR_COUNT 8
46#define HV_LOG_HEADER_SIZE FIELD_OFFSET(HBASE_BLOCK, Reserved2)
51#define HV_CLEAN_BLOCK 0U
56#define HV_LOG_DIRTY_BLOCK 0xFF
57#define HV_LOG_DIRTY_SIGNATURE 0x54524944
62#define HV_HHIVE_SIGNATURE 0xbee0bee0
63#define HV_HBLOCK_SIGNATURE 0x66676572
64#define HV_HBIN_SIGNATURE 0x6e696268
71#define HSYS_WHISTLER_BETA1 4
72#define HSYS_WHISTLER 5
73#define HSYS_MINOR_SUPPORTED HSYS_WHISTLER
78#define HBASE_FORMAT_MEMORY 1
88#define HBOOT_TYPE_REGULAR 0
89#define HBOOT_TYPE_SELF_HEAL 4
94#define HBOOT_NO_BOOT_RECOVER 0
95#define HBOOT_BOOT_RECOVERED_BY_HIVE_LOG 1
96#define HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE 2
110#define HCELL_NIL MAXULONG
111#define HCELL_CACHED 1
113#define HCELL_TYPE_MASK 0x80000000
114#define HCELL_BLOCK_MASK 0x7ffff000
115#define HCELL_OFFSET_MASK 0x00000fff
116#define HCELL_TYPE_SHIFT 31
117#define HCELL_BLOCK_SHIFT 12
118#define HCELL_OFFSET_SHIFT 0
120#define HvGetCellType(Cell) \
121 ((ULONG)(((Cell) & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT))
122#define HvGetCellBlock(Cell) \
123 ((ULONG)(((Cell) & HCELL_BLOCK_MASK) >> HCELL_BLOCK_SHIFT))
139#define HIVE_FILENAME_MAXLEN 31
249 struct _HHIVE *RegistryHive,
258 struct _HHIVE *RegistryHive,
267 struct _HHIVE *RegistryHive,
275 struct _HHIVE *RegistryHive,
325#if (NTDDI_VERSION >= NTDDI_WIN7)
336#if (NTDDI_VERSION < NTDDI_VISTA)
341#if (NTDDI_VERSION >= NTDDI_VISTA)
348#if (NTDDI_VERSION < NTDDI_VISTA)
360#define IsFreeCell(Cell) ((Cell)->Size >= 0)
361#define IsUsedCell(Cell) ((Cell)->Size < 0)
_In_ PFCB _In_ LONGLONG FileOffset
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
BOOLEAN(CMAPI * PFILE_READ_ROUTINE)(struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)
VOID(CMAPI * PRELEASE_CELL_ROUTINE)(struct _HHIVE *Hive, HCELL_INDEX Cell)
struct _HMAP_DIRECTORY * PHMAP_DIRECTORY
BOOLEAN(CMAPI * PFILE_WRITE_ROUTINE)(struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)
VOID(CMAPI * PFREE_ROUTINE)(PVOID Ptr, ULONG Quota)
struct _CELL_DATA *CMAPI * PGET_CELL_ROUTINE(struct _HHIVE *Hive, HCELL_INDEX Cell)
struct _HBASE_BLOCK HBASE_BLOCK
struct _HMAP_TABLE HMAP_TABLE
#define HIVE_FILENAME_MAXLEN
BOOLEAN(CMAPI * PFILE_FLUSH_ROUTINE)(struct _HHIVE *RegistryHive, ULONG FileType, PLARGE_INTEGER FileOffset, ULONG Length)
struct _HMAP_ENTRY * PHMAP_ENTRY
struct _HMAP_TABLE * PHMAP_TABLE
PVOID(CMAPI * PALLOCATE_ROUTINE)(SIZE_T Size, BOOLEAN Paged, ULONG Tag)
struct _HMAP_ENTRY HMAP_ENTRY
struct _HMAP_DIRECTORY HMAP_DIRECTORY
BOOLEAN(CMAPI * PFILE_SET_SIZE_ROUTINE)(struct _HHIVE *RegistryHive, ULONG FileType, ULONG FileSize, ULONG OldfileSize)
struct _HBASE_BLOCK * PHBASE_BLOCK
_In_ ULONG _In_ ULONG _In_ ULONG Length
base for all directory entries
HCELL_INDEX FreeDisplay[24]
PFILE_FLUSH_ROUTINE FileFlush
PFILE_SET_SIZE_ROUTINE FileSetSize
PFILE_WRITE_ROUTINE FileWrite
PALLOCATE_ROUTINE Allocate
PFILE_READ_ROUTINE FileRead
PGET_CELL_ROUTINE GetCellRoutine
DUAL Storage[HTYPE_COUNT]
PRELEASE_CELL_ROUTINE ReleaseCellRoutine
struct _CM_VIEW_OF_FILE * CmView
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_In_ WDFDEVICE _In_ WDF_SPECIAL_FILE_TYPE FileType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength