da2ef1d9f89e8307b5a1ad4ca91b4ba7dff3b75d
[reactos.git] / reactos / boot / freeldr / freeldr / include / registry.h
1 /*
2 * FreeLoader - registry.h
3 *
4 * Copyright (C) 2001 Eric Kohl
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #ifndef __REGISTRY_H
22 #define __REGISTRY_H
23
24 #define TAG_REG_NAME 'NgeR'
25 #define TAG_REG_KEY 'KgeR'
26 #define TAG_REG_KEY_DATA 'DgeR'
27 #define TAG_REG_VALUE 'VgeR'
28
29 typedef struct _REG_KEY
30 {
31 LIST_ENTRY KeyList;
32 LIST_ENTRY SubKeyList;
33 LIST_ENTRY ValueList;
34
35 ULONG SubKeyCount;
36 ULONG ValueCount;
37
38 ULONG NameSize;
39 PWCHAR Name;
40
41 /* default data */
42 ULONG DataType;
43 ULONG DataSize;
44 PCHAR Data;
45 } KEY, *FRLDRHKEY, **PFRLDRHKEY;
46
47
48 typedef struct _REG_VALUE
49 {
50 LIST_ENTRY ValueList;
51
52 /* value name */
53 ULONG NameSize;
54 PWCHAR Name;
55
56 /* value data */
57 ULONG DataType;
58 ULONG DataSize;
59 PCHAR Data;
60 } VALUE, *PVALUE;
61
62 #define assert(x)
63
64 VOID
65 RegInitializeRegistry(VOID);
66
67 LONG
68 RegInitCurrentControlSet(BOOLEAN LastKnownGood);
69
70
71 LONG
72 RegCreateKey(FRLDRHKEY ParentKey,
73 PCWSTR KeyName,
74 PFRLDRHKEY Key);
75
76 LONG
77 RegDeleteKey(FRLDRHKEY Key,
78 PCWSTR Name);
79
80 LONG
81 RegEnumKey(FRLDRHKEY Key,
82 ULONG Index,
83 PWCHAR Name,
84 ULONG* NameSize);
85
86 LONG
87 RegOpenKey(FRLDRHKEY ParentKey,
88 PCWSTR KeyName,
89 PFRLDRHKEY Key);
90
91
92 LONG
93 RegSetValue(FRLDRHKEY Key,
94 PCWSTR ValueName,
95 ULONG Type,
96 PCSTR Data,
97 ULONG DataSize);
98
99 LONG
100 RegQueryValue(FRLDRHKEY Key,
101 PCWSTR ValueName,
102 ULONG* Type,
103 PUCHAR Data,
104 ULONG* DataSize);
105
106 LONG
107 RegDeleteValue(FRLDRHKEY Key,
108 PCWSTR ValueName);
109
110 LONG
111 RegEnumValue(FRLDRHKEY Key,
112 ULONG Index,
113 PWCHAR ValueName,
114 ULONG* NameSize,
115 ULONG* Type,
116 PUCHAR Data,
117 ULONG* DataSize);
118
119 ULONG
120 RegGetSubKeyCount (FRLDRHKEY Key);
121
122 ULONG
123 RegGetValueCount (FRLDRHKEY Key);
124
125
126 BOOLEAN
127 RegImportBinaryHive (PCHAR ChunkBase,
128 ULONG ChunkSize);
129
130 BOOLEAN
131 RegExportBinaryHive (PCWSTR KeyName,
132 PCHAR ChunkBase,
133 ULONG* ChunkSize);
134
135
136 #endif /* __REGISTRY_H */
137
138 /* EOF */
139