2 * PROJECT: registry manipulation library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * COPYRIGHT: Copyright 2005 Filip Navara <navaraf@reactos.org>
5 * Copyright 2001 - 2005 Eric Kohl
11 #define REG_INIT_BLOCK_LIST_SIZE 32
12 #define REG_INIT_HASH_TABLE_SIZE 3
13 #define REG_EXTEND_HASH_TABLE_SIZE 4
14 #define REG_VALUE_LIST_CELL_MULTIPLE 4
16 #define REG_KEY_CELL_ID 0x6b6e
17 #define REG_HASH_TABLE_CELL_ID 0x666c
18 #define REG_VALUE_CELL_ID 0x6b76
19 #define REG_SECURITY_CELL_ID 0x6b73
24 #include <host/pshpack1.h>
29 typedef struct _CM_VIEW_OF_FILE
31 LIST_ENTRY LRUViewList
;
32 LIST_ENTRY PinViewList
;
38 } CM_VIEW_OF_FILE
, *PCM_VIEW_OF_FILE
;
40 typedef struct _CHILD_LIST
44 } CHILD_LIST
, *PCHILD_LIST
;
46 typedef struct _CM_KEY_NODE
48 /* Key cell identifier "kn" (0x6b6e) */
54 /* Time of last flush */
55 LARGE_INTEGER LastWriteTime
;
59 /* BlockAddress offset of parent key cell */
62 /* Count of sub keys for the key in this key cell (stable & volatile) */
63 ULONG SubKeyCounts
[HvMaxStorageType
];
65 /* BlockAddress offset of has table for FIXME: subkeys/values? (stable & volatile) */
66 HCELL_INDEX SubKeyLists
[HvMaxStorageType
];
70 /* BlockAddress offset of security cell */
71 HCELL_INDEX SecurityKeyOffset
;
73 /* BlockAddress offset of registry key class */
74 HCELL_INDEX ClassNameOffset
;
78 ULONG MaxValueNameLen
;
79 ULONG MaxValueDataLen
;
82 /* Size in bytes of key name */
85 /* Size of class name in bytes */
88 /* Name of key (not zero terminated) */
90 } CM_KEY_NODE
, *PCM_KEY_NODE
;
92 /* CM_KEY_NODE.Flags constants */
93 #define REG_KEY_VOLATILE_CELL 0x01
94 #define REG_KEY_ROOT_CELL 0x0C
95 #define REG_KEY_LINK_CELL 0x10
96 #define REG_KEY_NAME_PACKED 0x20
102 * packed name: four letters of value's name
105 typedef struct _HASH_RECORD
107 HCELL_INDEX KeyOffset
;
109 } HASH_RECORD
, *PHASH_RECORD
;
111 typedef struct _HASH_TABLE_CELL
114 USHORT HashTableSize
;
115 HASH_RECORD Table
[0];
116 } HASH_TABLE_CELL
, *PHASH_TABLE_CELL
;
118 typedef struct _VALUE_LIST_CELL
120 HCELL_INDEX ValueOffset
[0];
121 } VALUE_LIST_CELL
, *PVALUE_LIST_CELL
;
123 typedef struct _CM_KEY_VALUE
126 USHORT NameSize
; // length of Name
127 ULONG DataSize
; // length of datas in the cell pointed by DataOffset
128 HCELL_INDEX DataOffset
;// datas are here if high bit of DataSize is set
132 UCHAR Name
[0]; /* warning : not zero terminated */
133 } CM_KEY_VALUE
, *PCM_KEY_VALUE
;
135 /* CM_KEY_VALUE.Flags constants */
136 #define REG_VALUE_NAME_PACKED 0x0001
138 /* CM_KEY_VALUE.DataSize mask constants */
139 #define REG_DATA_SIZE_MASK 0x7FFFFFFF
140 #define REG_DATA_IN_OFFSET 0x80000000
142 typedef struct _CM_KEY_SECURITY
144 USHORT Signature
; // "sk"
148 ULONG ReferenceCount
;
149 ULONG DescriptorLength
;
150 //SECURITY_DESCRIPTOR_RELATIVE Descriptor;
152 } CM_KEY_SECURITY
, *PCM_KEY_SECURITY
;
155 #include <host/poppack.h>
162 #endif /* CMLIB_CMDATA_H */