ReactOS 0.4.15-dev-7788-g1ad9096
hivedata.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for hivedata.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _HBASE_BLOCK
 
struct  _HBIN
 
struct  _HCELL
 
struct  _HMAP_ENTRY
 
struct  _HMAP_TABLE
 
struct  _HMAP_DIRECTORY
 
struct  _DUAL
 
struct  _HHIVE
 

Macros

#define HINIT_CREATE   0
 
#define HINIT_MEMORY   1
 
#define HINIT_FILE   2
 
#define HINIT_MEMORY_INPLACE   3
 
#define HINIT_FLAT   4
 
#define HINIT_MAPFILE   5
 
#define HIVE_VOLATILE   1
 
#define HIVE_NOLAZYFLUSH   2
 
#define HIVE_HAS_BEEN_REPLACED   4
 
#define HIVE_HAS_BEEN_FREED   8
 
#define HIVE_UNKNOWN   0x10
 
#define HIVE_IS_UNLOADING   0x20
 
#define HFILE_TYPE_PRIMARY   0
 
#define HFILE_TYPE_LOG   1
 
#define HFILE_TYPE_EXTERNAL   2
 
#define HFILE_TYPE_ALTERNATE   3
 
#define HFILE_TYPE_MAX   4
 
#define HBLOCK_SIZE   0x1000
 
#define HSECTOR_SIZE   0x200
 
#define HSECTOR_COUNT   8
 
#define HV_LOG_HEADER_SIZE   FIELD_OFFSET(HBASE_BLOCK, Reserved2)
 
#define HV_CLEAN_BLOCK   0U
 
#define HV_LOG_DIRTY_BLOCK   0xFF
 
#define HV_LOG_DIRTY_SIGNATURE   0x54524944
 
#define HV_HHIVE_SIGNATURE   0xbee0bee0
 
#define HV_HBLOCK_SIGNATURE   0x66676572
 
#define HV_HBIN_SIGNATURE   0x6e696268
 
#define HSYS_MAJOR   1
 
#define HSYS_MINOR   3
 
#define HSYS_WHISTLER_BETA1   4
 
#define HSYS_WHISTLER   5
 
#define HSYS_MINOR_SUPPORTED   HSYS_WHISTLER
 
#define HBASE_FORMAT_MEMORY   1
 
#define HTYPE_COUNT   2
 
#define HBOOT_TYPE_REGULAR   0
 
#define HBOOT_TYPE_SELF_HEAL   4
 
#define HBOOT_NO_BOOT_RECOVER   0
 
#define HBOOT_BOOT_RECOVERED_BY_HIVE_LOG   1
 
#define HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE   2
 

HCELL_INDEX

A handle to cell index. The highest bit specifies the cell storage and the other bits specify index into the hive file. The value HCELL_NULL (-1) is reserved for marking invalid cells.

#define HCELL_NIL   MAXULONG
 
#define HCELL_CACHED   1
 
#define HCELL_TYPE_MASK   0x80000000
 
#define HCELL_BLOCK_MASK   0x7ffff000
 
#define HCELL_OFFSET_MASK   0x00000fff
 
#define HCELL_TYPE_SHIFT   31
 
#define HCELL_BLOCK_SHIFT   12
 
#define HCELL_OFFSET_SHIFT   0
 
#define HvGetCellType(Cell)    ((ULONG)(((Cell) & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT))
 
#define HvGetCellBlock(Cell)    ((ULONG)(((Cell) & HCELL_BLOCK_MASK) >> HCELL_BLOCK_SHIFT))
 
enum  HSTORAGE_TYPE { Stable = 0 , Volatile = 1 }
 
typedef ULONG HCELL_INDEX
 
typedef ULONGPHCELL_INDEX
 

HBASE_BLOCK

On-disk header for registry hive file.

#define HIVE_FILENAME_MAXLEN   31
 
#define IsFreeCell(Cell)   ((Cell)->Size >= 0)
 
#define IsUsedCell(Cell)   ((Cell)->Size < 0)
 
typedef struct _HBASE_BLOCK HBASE_BLOCK
 
typedef struct _HBASE_BLOCKPHBASE_BLOCK
 
typedef struct _HBIN HBIN
 
typedef struct _HBINPHBIN
 
typedef struct _HCELL HCELL
 
typedef struct _HCELLPHCELL
 
typedef struct _CELL_DATA *CMAPIPGET_CELL_ROUTINE(struct _HHIVE *Hive, HCELL_INDEX Cell)
 
typedef VOID(CMAPIPRELEASE_CELL_ROUTINE) (struct _HHIVE *Hive, HCELL_INDEX Cell)
 
typedef PVOID(CMAPIPALLOCATE_ROUTINE) (SIZE_T Size, BOOLEAN Paged, ULONG Tag)
 
typedef VOID(CMAPIPFREE_ROUTINE) (PVOID Ptr, ULONG Quota)
 
typedef BOOLEAN(CMAPIPFILE_READ_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)
 
typedef BOOLEAN(CMAPIPFILE_WRITE_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)
 
typedef BOOLEAN(CMAPIPFILE_SET_SIZE_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, ULONG FileSize, ULONG OldfileSize)
 
typedef BOOLEAN(CMAPIPFILE_FLUSH_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PLARGE_INTEGER FileOffset, ULONG Length)
 
typedef struct _HMAP_ENTRY HMAP_ENTRY
 
typedef struct _HMAP_ENTRYPHMAP_ENTRY
 
typedef struct _HMAP_TABLE HMAP_TABLE
 
typedef struct _HMAP_TABLEPHMAP_TABLE
 
typedef struct _HMAP_DIRECTORY HMAP_DIRECTORY
 
typedef struct _HMAP_DIRECTORYPHMAP_DIRECTORY
 
typedef struct _DUAL DUAL
 
typedef struct _DUALPDUAL
 
typedef struct _HHIVE HHIVE
 
typedef struct _HHIVEPHHIVE
 
 C_ASSERT (sizeof(HBASE_BLOCK)==HBLOCK_SIZE)
 

Macro Definition Documentation

◆ HBASE_FORMAT_MEMORY

#define HBASE_FORMAT_MEMORY   1

Definition at line 78 of file hivedata.h.

◆ HBLOCK_SIZE

#define HBLOCK_SIZE   0x1000

Definition at line 42 of file hivedata.h.

◆ HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE

#define HBOOT_BOOT_RECOVERED_BY_ALTERNATE_HIVE   2

Definition at line 96 of file hivedata.h.

◆ HBOOT_BOOT_RECOVERED_BY_HIVE_LOG

#define HBOOT_BOOT_RECOVERED_BY_HIVE_LOG   1

Definition at line 95 of file hivedata.h.

◆ HBOOT_NO_BOOT_RECOVER

#define HBOOT_NO_BOOT_RECOVER   0

Definition at line 94 of file hivedata.h.

◆ HBOOT_TYPE_REGULAR

#define HBOOT_TYPE_REGULAR   0

Definition at line 88 of file hivedata.h.

◆ HBOOT_TYPE_SELF_HEAL

#define HBOOT_TYPE_SELF_HEAL   4

Definition at line 89 of file hivedata.h.

◆ HCELL_BLOCK_MASK

#define HCELL_BLOCK_MASK   0x7ffff000

Definition at line 114 of file hivedata.h.

◆ HCELL_BLOCK_SHIFT

#define HCELL_BLOCK_SHIFT   12

Definition at line 117 of file hivedata.h.

◆ HCELL_CACHED

#define HCELL_CACHED   1

Definition at line 111 of file hivedata.h.

◆ HCELL_NIL

#define HCELL_NIL   MAXULONG

Definition at line 110 of file hivedata.h.

◆ HCELL_OFFSET_MASK

#define HCELL_OFFSET_MASK   0x00000fff

Definition at line 115 of file hivedata.h.

◆ HCELL_OFFSET_SHIFT

#define HCELL_OFFSET_SHIFT   0

Definition at line 118 of file hivedata.h.

◆ HCELL_TYPE_MASK

#define HCELL_TYPE_MASK   0x80000000

Definition at line 113 of file hivedata.h.

◆ HCELL_TYPE_SHIFT

#define HCELL_TYPE_SHIFT   31

Definition at line 116 of file hivedata.h.

◆ HFILE_TYPE_ALTERNATE

#define HFILE_TYPE_ALTERNATE   3

Definition at line 36 of file hivedata.h.

◆ HFILE_TYPE_EXTERNAL

#define HFILE_TYPE_EXTERNAL   2

Definition at line 35 of file hivedata.h.

◆ HFILE_TYPE_LOG

#define HFILE_TYPE_LOG   1

Definition at line 34 of file hivedata.h.

◆ HFILE_TYPE_MAX

#define HFILE_TYPE_MAX   4

Definition at line 37 of file hivedata.h.

◆ HFILE_TYPE_PRIMARY

#define HFILE_TYPE_PRIMARY   0

Definition at line 33 of file hivedata.h.

◆ HINIT_CREATE

#define HINIT_CREATE   0

Definition at line 13 of file hivedata.h.

◆ HINIT_FILE

#define HINIT_FILE   2

Definition at line 15 of file hivedata.h.

◆ HINIT_FLAT

#define HINIT_FLAT   4

Definition at line 17 of file hivedata.h.

◆ HINIT_MAPFILE

#define HINIT_MAPFILE   5

Definition at line 18 of file hivedata.h.

◆ HINIT_MEMORY

#define HINIT_MEMORY   1

Definition at line 14 of file hivedata.h.

◆ HINIT_MEMORY_INPLACE

#define HINIT_MEMORY_INPLACE   3

Definition at line 16 of file hivedata.h.

◆ HIVE_FILENAME_MAXLEN

#define HIVE_FILENAME_MAXLEN   31

Definition at line 139 of file hivedata.h.

◆ HIVE_HAS_BEEN_FREED

#define HIVE_HAS_BEEN_FREED   8

Definition at line 26 of file hivedata.h.

◆ HIVE_HAS_BEEN_REPLACED

#define HIVE_HAS_BEEN_REPLACED   4

Definition at line 25 of file hivedata.h.

◆ HIVE_IS_UNLOADING

#define HIVE_IS_UNLOADING   0x20

Definition at line 28 of file hivedata.h.

◆ HIVE_NOLAZYFLUSH

#define HIVE_NOLAZYFLUSH   2

Definition at line 24 of file hivedata.h.

◆ HIVE_UNKNOWN

#define HIVE_UNKNOWN   0x10

Definition at line 27 of file hivedata.h.

◆ HIVE_VOLATILE

#define HIVE_VOLATILE   1

Definition at line 23 of file hivedata.h.

◆ HSECTOR_COUNT

#define HSECTOR_COUNT   8

Definition at line 44 of file hivedata.h.

◆ HSECTOR_SIZE

#define HSECTOR_SIZE   0x200

Definition at line 43 of file hivedata.h.

◆ HSYS_MAJOR

#define HSYS_MAJOR   1

Definition at line 69 of file hivedata.h.

◆ HSYS_MINOR

#define HSYS_MINOR   3

Definition at line 70 of file hivedata.h.

◆ HSYS_MINOR_SUPPORTED

#define HSYS_MINOR_SUPPORTED   HSYS_WHISTLER

Definition at line 73 of file hivedata.h.

◆ HSYS_WHISTLER

#define HSYS_WHISTLER   5

Definition at line 72 of file hivedata.h.

◆ HSYS_WHISTLER_BETA1

#define HSYS_WHISTLER_BETA1   4

Definition at line 71 of file hivedata.h.

◆ HTYPE_COUNT

#define HTYPE_COUNT   2

Definition at line 83 of file hivedata.h.

◆ HV_CLEAN_BLOCK

#define HV_CLEAN_BLOCK   0U

Definition at line 51 of file hivedata.h.

◆ HV_HBIN_SIGNATURE

#define HV_HBIN_SIGNATURE   0x6e696268

Definition at line 64 of file hivedata.h.

◆ HV_HBLOCK_SIGNATURE

#define HV_HBLOCK_SIGNATURE   0x66676572

Definition at line 63 of file hivedata.h.

◆ HV_HHIVE_SIGNATURE

#define HV_HHIVE_SIGNATURE   0xbee0bee0

Definition at line 62 of file hivedata.h.

◆ HV_LOG_DIRTY_BLOCK

#define HV_LOG_DIRTY_BLOCK   0xFF

Definition at line 56 of file hivedata.h.

◆ HV_LOG_DIRTY_SIGNATURE

#define HV_LOG_DIRTY_SIGNATURE   0x54524944

Definition at line 57 of file hivedata.h.

◆ HV_LOG_HEADER_SIZE

#define HV_LOG_HEADER_SIZE   FIELD_OFFSET(HBASE_BLOCK, Reserved2)

Definition at line 46 of file hivedata.h.

◆ HvGetCellBlock

#define HvGetCellBlock (   Cell)     ((ULONG)(((Cell) & HCELL_BLOCK_MASK) >> HCELL_BLOCK_SHIFT))

Definition at line 122 of file hivedata.h.

◆ HvGetCellType

#define HvGetCellType (   Cell)     ((ULONG)(((Cell) & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT))

Definition at line 120 of file hivedata.h.

◆ IsFreeCell

#define IsFreeCell (   Cell)    ((Cell)->Size >= 0)

Definition at line 360 of file hivedata.h.

◆ IsUsedCell

#define IsUsedCell (   Cell)    ((Cell)->Size < 0)

Definition at line 361 of file hivedata.h.

Typedef Documentation

◆ DUAL

typedef struct _DUAL DUAL

◆ HBASE_BLOCK

◆ HBIN

typedef struct _HBIN HBIN

◆ HCELL

typedef struct _HCELL HCELL

◆ HCELL_INDEX

typedef ULONG HCELL_INDEX

Definition at line 105 of file hivedata.h.

◆ HHIVE

typedef struct _HHIVE HHIVE

◆ HMAP_DIRECTORY

◆ HMAP_ENTRY

◆ HMAP_TABLE

◆ PALLOCATE_ROUTINE

typedef PVOID(CMAPI * PALLOCATE_ROUTINE) (SIZE_T Size, BOOLEAN Paged, ULONG Tag)

Definition at line 234 of file hivedata.h.

◆ PDUAL

typedef struct _DUAL * PDUAL

◆ PFILE_FLUSH_ROUTINE

typedef BOOLEAN(CMAPI * PFILE_FLUSH_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PLARGE_INTEGER FileOffset, ULONG Length)

Definition at line 273 of file hivedata.h.

◆ PFILE_READ_ROUTINE

typedef BOOLEAN(CMAPI * PFILE_READ_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)

Definition at line 247 of file hivedata.h.

◆ PFILE_SET_SIZE_ROUTINE

typedef BOOLEAN(CMAPI * PFILE_SET_SIZE_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, ULONG FileSize, ULONG OldfileSize)

Definition at line 265 of file hivedata.h.

◆ PFILE_WRITE_ROUTINE

typedef BOOLEAN(CMAPI * PFILE_WRITE_ROUTINE) (struct _HHIVE *RegistryHive, ULONG FileType, PULONG FileOffset, PVOID Buffer, SIZE_T BufferLength)

Definition at line 256 of file hivedata.h.

◆ PFREE_ROUTINE

typedef VOID(CMAPI * PFREE_ROUTINE) (PVOID Ptr, ULONG Quota)

Definition at line 241 of file hivedata.h.

◆ PGET_CELL_ROUTINE

typedef struct _CELL_DATA *CMAPI * PGET_CELL_ROUTINE(struct _HHIVE *Hive, HCELL_INDEX Cell)

Definition at line 223 of file hivedata.h.

◆ PHBASE_BLOCK

◆ PHBIN

typedef struct _HBIN * PHBIN

◆ PHCELL

typedef struct _HCELL * PHCELL

◆ PHCELL_INDEX

typedef ULONG * PHCELL_INDEX

Definition at line 105 of file hivedata.h.

◆ PHHIVE

typedef struct _HHIVE * PHHIVE

◆ PHMAP_DIRECTORY

◆ PHMAP_ENTRY

◆ PHMAP_TABLE

◆ PRELEASE_CELL_ROUTINE

typedef VOID(CMAPI * PRELEASE_CELL_ROUTINE) (struct _HHIVE *Hive, HCELL_INDEX Cell)

Definition at line 228 of file hivedata.h.

Enumeration Type Documentation

◆ HSTORAGE_TYPE

Enumerator
Stable 
Volatile 

Definition at line 125 of file hivedata.h.

126{
127 Stable = 0,
128 Volatile = 1
HSTORAGE_TYPE
Definition: hivedata.h:126
@ Volatile
Definition: hivedata.h:128
@ Stable
Definition: hivedata.h:127

Function Documentation

◆ C_ASSERT()

C_ASSERT ( sizeof(HBASE_BLOCK = =HBLOCK_SIZE)