mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 09:24:11 +00:00
a252970435
The motivation to upgrade this host-tool is to fix a compile-time warning: [4890/10620] Generating boot/bootdata/...oot/bootdata/system, boot/bootdata/BCD Binary hive maker ->RegDeleteKeyW(0x0xcab210, '') is UNIMPLEMENTED! [145/10684] Generating boot/bootdata/BCD Binary hive maker Creating binary hive: /home/jhenze/Release_WorkDir/Repo/output-MinGW-i386/reactos/boot/bootdata/BCD Thw warning was most likely introduced when we started using mkhive in the hosttools, and is triggered by livecd.inf having a [DelReg] section. Warning fixed by implementing RegDeleteKeyW(). It can not delete full trees yet, but we also don't need that for our mkhive-usage yet. While touching it, do also fix some other minor glitches and leaks. This is a PARTIAL backport of the 15 commits from 0.4.11-dev, all to mkhive from 2018-10-09 to 2018-10-20.
68 lines
2.1 KiB
C
68 lines
2.1 KiB
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS hive maker
|
|
* FILE: tools/mkhive/registry.h
|
|
* PURPOSE: Registry code
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
typedef struct _REPARSE_POINT
|
|
{
|
|
LIST_ENTRY ListEntry;
|
|
PCMHIVE SourceHive;
|
|
HCELL_INDEX SourceKeyCellOffset;
|
|
PCMHIVE DestinationHive;
|
|
HCELL_INDEX DestinationKeyCellOffset;
|
|
} REPARSE_POINT, *PREPARSE_POINT;
|
|
|
|
typedef struct _MEMKEY
|
|
{
|
|
/* Information on hard disk structure */
|
|
HCELL_INDEX KeyCellOffset;
|
|
PCMHIVE RegistryHive;
|
|
} MEMKEY, *PMEMKEY;
|
|
|
|
#define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
|
|
#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
|
|
|
|
extern CMHIVE DefaultHive; /* \Registry\User\.DEFAULT */
|
|
extern CMHIVE SamHive; /* \Registry\Machine\SAM */
|
|
extern CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */
|
|
extern CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */
|
|
extern CMHIVE SystemHive; /* \Registry\Machine\SYSTEM */
|
|
extern CMHIVE BcdHive; /* \Registry\Machine\BCD00000000 */
|
|
|
|
#define ERROR_SUCCESS 0L
|
|
#define ERROR_UNSUCCESSFUL 1L
|
|
#define ERROR_FILE_NOT_FOUND 2L
|
|
#define ERROR_ACCESS_DENIED 5L
|
|
#define ERROR_OUTOFMEMORY 14L
|
|
#define ERROR_GEN_FAILURE 31L
|
|
#define ERROR_INVALID_PARAMETER 87L
|
|
// #define ERROR_MORE_DATA 234L
|
|
// #define ERROR_NO_MORE_ITEMS 259L
|
|
|
|
#define REG_NONE 0
|
|
#define REG_SZ 1
|
|
#define REG_EXPAND_SZ 2
|
|
#define REG_BINARY 3
|
|
#define REG_DWORD 4
|
|
#define REG_DWORD_LITTLE_ENDIAN 4
|
|
#define REG_DWORD_BIG_ENDIAN 5
|
|
#define REG_LINK 6
|
|
#define REG_MULTI_SZ 7
|
|
#define REG_RESOURCE_LIST 8
|
|
#define REG_FULL_RESOURCE_DESCRIPTOR 9
|
|
#define REG_RESOURCE_REQUIREMENTS_LIST 10
|
|
#define REG_QWORD 11
|
|
#define REG_QWORD_LITTLE_ENDIAN 11
|
|
|
|
VOID
|
|
RegInitializeRegistry(VOID);
|
|
|
|
VOID
|
|
RegShutdownRegistry(VOID);
|
|
|
|
/* EOF */
|