bf81236cfa4a31d508242580a765cf4c7b4788fe
[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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #ifndef __REGISTRY_H
22 #define __REGISTRY_H
23
24 typedef struct _REG_KEY
25 {
26 LIST_ENTRY KeyList;
27 LIST_ENTRY SubKeyList;
28 LIST_ENTRY ValueList;
29
30 ULONG SubKeyCount;
31 ULONG ValueCount;
32
33 ULONG NameSize;
34 PWCHAR Name;
35
36 /* default data */
37 ULONG DataType;
38 ULONG DataSize;
39 PCHAR Data;
40 } KEY, *FRLDRHKEY, **PFRLDRHKEY;
41
42
43 typedef struct _REG_VALUE
44 {
45 LIST_ENTRY ValueList;
46
47 /* value name */
48 ULONG NameSize;
49 PWCHAR Name;
50
51 /* value data */
52 ULONG DataType;
53 ULONG DataSize;
54 PCHAR Data;
55 } VALUE, *PVALUE;
56
57
58 #define ERROR_SUCCESS 0L
59 #define ERROR_OUTOFMEMORY 14L
60 #define ERROR_INVALID_PARAMETER 87L
61 #define ERROR_MORE_DATA 234L
62 #define ERROR_NO_MORE_ITEMS 259L
63
64 #define assert(x)
65
66 VOID
67 RegInitializeRegistry(VOID);
68
69 LONG
70 RegInitCurrentControlSet(BOOL LastKnownGood);
71
72
73 LONG
74 RegCreateKey(FRLDRHKEY ParentKey,
75 PCWSTR KeyName,
76 PFRLDRHKEY Key);
77
78 LONG
79 RegDeleteKey(FRLDRHKEY Key,
80 PCWSTR Name);
81
82 LONG
83 RegEnumKey(FRLDRHKEY Key,
84 ULONG Index,
85 PWCHAR Name,
86 ULONG* NameSize);
87
88 LONG
89 RegOpenKey(FRLDRHKEY ParentKey,
90 PCWSTR KeyName,
91 PFRLDRHKEY Key);
92
93
94 LONG
95 RegSetValue(FRLDRHKEY Key,
96 PCWSTR ValueName,
97 ULONG Type,
98 PCSTR Data,
99 ULONG DataSize);
100
101 LONG
102 RegQueryValue(FRLDRHKEY Key,
103 PCWSTR ValueName,
104 ULONG* Type,
105 PUCHAR Data,
106 ULONG* DataSize);
107
108 LONG
109 RegDeleteValue(FRLDRHKEY Key,
110 PCWSTR ValueName);
111
112 LONG
113 RegEnumValue(FRLDRHKEY Key,
114 ULONG Index,
115 PWCHAR ValueName,
116 ULONG* NameSize,
117 ULONG* Type,
118 PUCHAR Data,
119 ULONG* DataSize);
120
121 ULONG
122 RegGetSubKeyCount (FRLDRHKEY Key);
123
124 ULONG
125 RegGetValueCount (FRLDRHKEY Key);
126
127
128 BOOL
129 RegImportBinaryHive (PCHAR ChunkBase,
130 ULONG ChunkSize);
131
132 BOOL
133 RegExportBinaryHive (PCWSTR KeyName,
134 PCHAR ChunkBase,
135 ULONG* ChunkSize);
136
137
138 #endif /* __REGISTRY_H */
139
140 /* EOF */
141