xref: /reactos/sdk/tools/mkhive/registry.h (revision c2c66aff)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS hive maker
4  * FILE:            tools/mkhive/registry.h
5  * PURPOSE:         Registry code
6  */
7 
8 #pragma once
9 
10 typedef struct _REPARSE_POINT
11 {
12     LIST_ENTRY ListEntry;
13     PCMHIVE SourceHive;
14     HCELL_INDEX SourceKeyCellOffset;
15     PCMHIVE DestinationHive;
16     HCELL_INDEX DestinationKeyCellOffset;
17 } REPARSE_POINT, *PREPARSE_POINT;
18 
19 typedef struct _MEMKEY
20 {
21     /* Information on hard disk structure */
22     HCELL_INDEX KeyCellOffset;
23     PCMHIVE RegistryHive;
24 } MEMKEY, *PMEMKEY;
25 
26 #define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
27 #define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
28 
29 extern CMHIVE DefaultHive;  /* \Registry\User\.DEFAULT */
30 extern CMHIVE SamHive;      /* \Registry\Machine\SAM */
31 extern CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */
32 extern CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */
33 extern CMHIVE SystemHive;   /* \Registry\Machine\SYSTEM */
34 extern CMHIVE BcdHive;      /* \Registry\Machine\BCD00000000 */
35 
36 #define ERROR_SUCCESS                    0L
37 #define ERROR_UNSUCCESSFUL               1L
38 #define ERROR_FILE_NOT_FOUND             2L
39 #define ERROR_OUTOFMEMORY                14L
40 #define ERROR_INVALID_PARAMETER          87L
41 #define ERROR_MORE_DATA                  234L
42 #define ERROR_NO_MORE_ITEMS              259L
43 
44 #define REG_NONE                           0
45 #define REG_SZ                             1
46 #define REG_EXPAND_SZ                      2
47 #define REG_BINARY                         3
48 #define REG_DWORD                          4
49 #define REG_DWORD_LITTLE_ENDIAN            4
50 #define REG_DWORD_BIG_ENDIAN               5
51 #define REG_LINK                           6
52 #define REG_MULTI_SZ                       7
53 #define REG_RESOURCE_LIST                  8
54 #define REG_FULL_RESOURCE_DESCRIPTOR       9
55 #define REG_RESOURCE_REQUIREMENTS_LIST     10
56 #define REG_QWORD                          11
57 #define REG_QWORD_LITTLE_ENDIAN            11
58 
59 VOID
60 RegInitializeRegistry(VOID);
61 
62 VOID
63 RegShutdownRegistry(VOID);
64 
65 /* EOF */
66