reactos/boot/freeldr/freeldr/ntldr/registry.h
Hermès Bélusca-Maïto 8ed7d4b341
[SDK:CMLIB][FREELDR:NTLDR] Revert commit 168fea0ee and provide a better fix. Addendum to 93d8a1b7b.
Correct fix was to fix the HCELL_INDEX <-> HKEY conversions, much like
is being done with UlongToHandle / HandleToUlong.

The on-disk/in-memory hive file structures are platform-independent:
their layout must not depend on whether code is compiled in 32 or 64
bits.
2022-04-17 16:46:47 +02:00

88 lines
1.9 KiB
C

/*
* FreeLoader - registry.h
*
* Copyright (C) 2001 Eric Kohl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __REGISTRY_H
#define __REGISTRY_H
#include <cmlib.h>
typedef HANDLE HKEY, *PHKEY;
#define HKEY_TO_HCI(hKey) ((HCELL_INDEX)(ULONG_PTR)(hKey))
BOOLEAN
RegImportBinaryHive(
_In_ PVOID ChunkBase,
_In_ ULONG ChunkSize);
BOOLEAN
RegInitCurrentControlSet(
_In_ BOOLEAN LastKnownGood);
extern PHHIVE SystemHive;
extern HKEY CurrentControlSetKey;
/*
* LONG
* RegCloseKey(
* _In_ HKEY hKey);
*/
#define RegCloseKey(hKey) (ERROR_SUCCESS)
#if 0
LONG
RegEnumKey(
_In_ HKEY Key,
_In_ ULONG Index,
_Out_ PWCHAR Name,
_Inout_ PULONG NameSize,
_Out_opt_ PHKEY SubKey);
#endif
LONG
RegOpenKey(
_In_ HKEY ParentKey,
_In_z_ PCWSTR KeyName,
_Out_ PHKEY Key);
LONG
RegQueryValue(
_In_ HKEY Key,
_In_z_ PCWSTR ValueName,
_Out_opt_ PULONG Type,
_Out_opt_ PUCHAR Data,
_Inout_opt_ PULONG DataSize);
#if 0
LONG
RegEnumValue(
_In_ HKEY Key,
_In_ ULONG Index,
_Out_ PWCHAR ValueName,
_Inout_ PULONG NameSize,
_Out_opt_ PULONG Type,
_Out_opt_ PUCHAR Data,
_Inout_opt_ PULONG DataSize)
#endif
#endif /* __REGISTRY_H */
/* EOF */