xref: /reactos/boot/freeldr/freeldr/ntldr/registry.h (revision 4514e91d)
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 #include <cmlib.h>
25 
26 typedef HANDLE HKEY, *PHKEY;
27 
28 #define HKEY_TO_HCI(hKey)               ((HCELL_INDEX)(ULONG_PTR)(hKey))
29 
30 BOOLEAN
31 RegImportBinaryHive(
32     _In_ PVOID ChunkBase,
33     _In_ ULONG ChunkSize,
34     _In_ PCSTR SearchPath,
35     _In_ BOOLEAN LoadAlternate);
36 
37 BOOLEAN
38 RegInitCurrentControlSet(
39     _In_ BOOLEAN LastKnownGood);
40 
41 extern PHHIVE SystemHive;
42 extern HKEY CurrentControlSetKey;
43 
44 /*
45  * LONG
46  * RegCloseKey(
47  *     _In_ HKEY hKey);
48  */
49 #define RegCloseKey(hKey)   (ERROR_SUCCESS)
50 
51 #if 0
52 LONG
53 RegEnumKey(
54     _In_ HKEY Key,
55     _In_ ULONG Index,
56     _Out_ PWCHAR Name,
57     _Inout_ PULONG NameSize,
58     _Out_opt_ PHKEY SubKey);
59 #endif
60 
61 LONG
62 RegOpenKey(
63     _In_ HKEY ParentKey,
64     _In_z_ PCWSTR KeyName,
65     _Out_ PHKEY Key);
66 
67 LONG
68 RegQueryValue(
69     _In_ HKEY Key,
70     _In_z_ PCWSTR ValueName,
71     _Out_opt_ PULONG Type,
72     _Out_opt_ PUCHAR Data,
73     _Inout_opt_ PULONG DataSize);
74 
75 #if 0
76 LONG
77 RegEnumValue(
78     _In_ HKEY Key,
79     _In_ ULONG Index,
80     _Out_ PWCHAR ValueName,
81     _Inout_ PULONG NameSize,
82     _Out_opt_ PULONG Type,
83     _Out_opt_ PUCHAR Data,
84     _Inout_opt_ PULONG DataSize)
85 #endif
86 
87 #endif /* __REGISTRY_H */
88 
89 /* EOF */
90