mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[FREELDR]
- Since the registry handling rewrite of Timo in r61595 all the freeldr-specific registry structures got deprecated. Remove them, as well as few other prototypes of non-existing functions. - Use the CMLIB registry flags instead of some (already-removed) flags --> fix build. svn path=/trunk/; revision=70594
This commit is contained in:
parent
62e9fb7872
commit
9e6cbffcd8
4 changed files with 25 additions and 78 deletions
|
@ -27,7 +27,7 @@ DBG_DEFAULT_CHANNEL(REGISTRY);
|
||||||
|
|
||||||
static PCMHIVE CmHive;
|
static PCMHIVE CmHive;
|
||||||
static PCM_KEY_NODE RootKeyNode;
|
static PCM_KEY_NODE RootKeyNode;
|
||||||
static FRLDRHKEY CurrentControlSetKey;
|
static HKEY CurrentControlSetKey;
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RegImportBinaryHive(
|
RegImportBinaryHive(
|
||||||
|
@ -77,8 +77,8 @@ RegInitCurrentControlSet(
|
||||||
_In_ BOOLEAN LastKnownGood)
|
_In_ BOOLEAN LastKnownGood)
|
||||||
{
|
{
|
||||||
WCHAR ControlSetKeyName[80];
|
WCHAR ControlSetKeyName[80];
|
||||||
FRLDRHKEY SelectKey;
|
HKEY SelectKey;
|
||||||
FRLDRHKEY SystemKey;
|
HKEY SystemKey;
|
||||||
ULONG CurrentSet = 0;
|
ULONG CurrentSet = 0;
|
||||||
ULONG DefaultSet = 0;
|
ULONG DefaultSet = 0;
|
||||||
ULONG LastKnownGoodSet = 0;
|
ULONG LastKnownGoodSet = 0;
|
||||||
|
@ -261,11 +261,11 @@ RegpFindSubkeyInIndex(
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegEnumKey(
|
RegEnumKey(
|
||||||
_In_ FRLDRHKEY Key,
|
_In_ HKEY Key,
|
||||||
_In_ ULONG Index,
|
_In_ ULONG Index,
|
||||||
_Out_ PWCHAR Name,
|
_Out_ PWCHAR Name,
|
||||||
_Inout_ ULONG* NameSize,
|
_Inout_ ULONG* NameSize,
|
||||||
_Out_opt_ FRLDRHKEY *SubKey)
|
_Out_opt_ PHKEY SubKey)
|
||||||
{
|
{
|
||||||
PHHIVE Hive = &CmHive->Hive;
|
PHHIVE Hive = &CmHive->Hive;
|
||||||
PCM_KEY_NODE KeyNode, SubKeyNode;
|
PCM_KEY_NODE KeyNode, SubKeyNode;
|
||||||
|
@ -307,7 +307,7 @@ RegEnumKey(
|
||||||
|
|
||||||
if (SubKey != NULL)
|
if (SubKey != NULL)
|
||||||
{
|
{
|
||||||
*SubKey = (FRLDRHKEY)SubKeyNode;
|
*SubKey = (HKEY)SubKeyNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("RegEnumKey done -> %u, '%.*s'\n", *NameSize, *NameSize, Name);
|
TRACE("RegEnumKey done -> %u, '%.*s'\n", *NameSize, *NameSize, Name);
|
||||||
|
@ -316,9 +316,9 @@ RegEnumKey(
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegOpenKey(
|
RegOpenKey(
|
||||||
_In_ FRLDRHKEY ParentKey,
|
_In_ HKEY ParentKey,
|
||||||
_In_z_ PCWSTR KeyName,
|
_In_z_ PCWSTR KeyName,
|
||||||
_Out_ PFRLDRHKEY Key)
|
_Out_ PHKEY Key)
|
||||||
{
|
{
|
||||||
UNICODE_STRING RemainingPath, SubKeyName;
|
UNICODE_STRING RemainingPath, SubKeyName;
|
||||||
UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet");
|
UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet");
|
||||||
|
@ -420,7 +420,7 @@ RegOpenKey(
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("RegOpenKey done\n");
|
TRACE("RegOpenKey done\n");
|
||||||
*Key = (FRLDRHKEY)KeyNode;
|
*Key = (HKEY)KeyNode;
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,14 +445,14 @@ RepGetValueData(
|
||||||
if (DataSize != NULL)
|
if (DataSize != NULL)
|
||||||
{
|
{
|
||||||
/* Get the data length */
|
/* Get the data length */
|
||||||
DataLength = ValueCell->DataLength & REG_DATA_SIZE_MASK;
|
DataLength = ValueCell->DataLength & ~CM_KEY_VALUE_SPECIAL_SIZE;
|
||||||
|
|
||||||
/* Does the caller want the data? */
|
/* Does the caller want the data? */
|
||||||
if ((Data != NULL) && (*DataSize != 0))
|
if ((Data != NULL) && (*DataSize != 0))
|
||||||
{
|
{
|
||||||
/* Check where the data is stored */
|
/* Check where the data is stored */
|
||||||
if ((DataLength <= sizeof(HCELL_INDEX)) &&
|
if ((DataLength <= sizeof(HCELL_INDEX)) &&
|
||||||
(ValueCell->DataLength & REG_DATA_IN_OFFSET))
|
(ValueCell->DataLength & CM_KEY_VALUE_SPECIAL_SIZE))
|
||||||
{
|
{
|
||||||
/* The data member contains the data */
|
/* The data member contains the data */
|
||||||
RtlCopyMemory(Data,
|
RtlCopyMemory(Data,
|
||||||
|
@ -477,7 +477,7 @@ RepGetValueData(
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegQueryValue(
|
RegQueryValue(
|
||||||
_In_ FRLDRHKEY Key,
|
_In_ HKEY Key,
|
||||||
_In_z_ PCWSTR ValueName,
|
_In_z_ PCWSTR ValueName,
|
||||||
_Out_opt_ ULONG* Type,
|
_Out_opt_ ULONG* Type,
|
||||||
_Out_opt_ PUCHAR Data,
|
_Out_opt_ PUCHAR Data,
|
||||||
|
@ -532,7 +532,7 @@ RegQueryValue(
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegEnumValue(
|
RegEnumValue(
|
||||||
_In_ FRLDRHKEY Key,
|
_In_ HKEY Key,
|
||||||
_In_ ULONG Index,
|
_In_ ULONG Index,
|
||||||
_Out_ PWCHAR ValueName,
|
_Out_ PWCHAR ValueName,
|
||||||
_Inout_ ULONG* NameSize,
|
_Inout_ ULONG* NameSize,
|
||||||
|
|
|
@ -21,43 +21,7 @@
|
||||||
#ifndef __REGISTRY_H
|
#ifndef __REGISTRY_H
|
||||||
#define __REGISTRY_H
|
#define __REGISTRY_H
|
||||||
|
|
||||||
#define TAG_REG_NAME 'NgeR'
|
typedef HANDLE HKEY, *PHKEY;
|
||||||
#define TAG_REG_KEY 'KgeR'
|
|
||||||
#define TAG_REG_KEY_DATA 'DgeR'
|
|
||||||
#define TAG_REG_VALUE 'VgeR'
|
|
||||||
|
|
||||||
typedef struct _REG_KEY
|
|
||||||
{
|
|
||||||
LIST_ENTRY KeyList;
|
|
||||||
LIST_ENTRY SubKeyList;
|
|
||||||
LIST_ENTRY ValueList;
|
|
||||||
|
|
||||||
ULONG SubKeyCount;
|
|
||||||
ULONG ValueCount;
|
|
||||||
|
|
||||||
ULONG NameSize;
|
|
||||||
PWCHAR Name;
|
|
||||||
|
|
||||||
/* Default data */
|
|
||||||
ULONG DataType;
|
|
||||||
ULONG DataSize;
|
|
||||||
PCHAR Data;
|
|
||||||
} KEY, *FRLDRHKEY, **PFRLDRHKEY;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _REG_VALUE
|
|
||||||
{
|
|
||||||
LIST_ENTRY ValueList;
|
|
||||||
|
|
||||||
/* Value name */
|
|
||||||
ULONG NameSize;
|
|
||||||
PWCHAR Name;
|
|
||||||
|
|
||||||
/* Value data */
|
|
||||||
ULONG DataType;
|
|
||||||
ULONG DataSize;
|
|
||||||
PCHAR Data;
|
|
||||||
} VALUE, *PVALUE;
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
RegInitializeRegistry(VOID);
|
RegInitializeRegistry(VOID);
|
||||||
|
@ -67,37 +31,33 @@ RegInitCurrentControlSet(BOOLEAN LastKnownGood);
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegEnumKey(
|
RegEnumKey(
|
||||||
_In_ FRLDRHKEY Key,
|
_In_ HKEY Key,
|
||||||
_In_ ULONG Index,
|
_In_ ULONG Index,
|
||||||
_Out_ PWCHAR Name,
|
_Out_ PWCHAR Name,
|
||||||
_Inout_ ULONG* NameSize,
|
_Inout_ ULONG* NameSize,
|
||||||
_Out_opt_ FRLDRHKEY *SubKey);
|
_Out_opt_ PHKEY SubKey);
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegOpenKey(FRLDRHKEY ParentKey,
|
RegOpenKey(HKEY ParentKey,
|
||||||
PCWSTR KeyName,
|
PCWSTR KeyName,
|
||||||
PFRLDRHKEY Key);
|
PHKEY Key);
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegSetValue(FRLDRHKEY Key,
|
RegSetValue(HKEY Key,
|
||||||
PCWSTR ValueName,
|
PCWSTR ValueName,
|
||||||
ULONG Type,
|
ULONG Type,
|
||||||
PCSTR Data,
|
PCSTR Data,
|
||||||
ULONG DataSize);
|
ULONG DataSize);
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegQueryValue(FRLDRHKEY Key,
|
RegQueryValue(HKEY Key,
|
||||||
PCWSTR ValueName,
|
PCWSTR ValueName,
|
||||||
ULONG* Type,
|
ULONG* Type,
|
||||||
PUCHAR Data,
|
PUCHAR Data,
|
||||||
ULONG* DataSize);
|
ULONG* DataSize);
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
RegDeleteValue(FRLDRHKEY Key,
|
RegEnumValue(HKEY Key,
|
||||||
PCWSTR ValueName);
|
|
||||||
|
|
||||||
LONG
|
|
||||||
RegEnumValue(FRLDRHKEY Key,
|
|
||||||
ULONG Index,
|
ULONG Index,
|
||||||
PWCHAR ValueName,
|
PWCHAR ValueName,
|
||||||
ULONG* NameSize,
|
ULONG* NameSize,
|
||||||
|
@ -105,23 +65,10 @@ RegEnumValue(FRLDRHKEY Key,
|
||||||
PUCHAR Data,
|
PUCHAR Data,
|
||||||
ULONG* DataSize);
|
ULONG* DataSize);
|
||||||
|
|
||||||
ULONG
|
|
||||||
RegGetSubKeyCount (FRLDRHKEY Key);
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
RegGetValueCount (FRLDRHKEY Key);
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
RegImportBinaryHive (PCHAR ChunkBase,
|
RegImportBinaryHive(PCHAR ChunkBase,
|
||||||
ULONG ChunkSize);
|
ULONG ChunkSize);
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
RegExportBinaryHive (PCWSTR KeyName,
|
|
||||||
PCHAR ChunkBase,
|
|
||||||
ULONG* ChunkSize);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __REGISTRY_H */
|
#endif /* __REGISTRY_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -411,7 +411,7 @@ USHORT
|
||||||
WinLdrDetectVersion(VOID)
|
WinLdrDetectVersion(VOID)
|
||||||
{
|
{
|
||||||
LONG rc;
|
LONG rc;
|
||||||
FRLDRHKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
rc = RegOpenKey(
|
rc = RegOpenKey(
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -196,7 +196,7 @@ WinLdrGetNLSNames(LPSTR AnsiName,
|
||||||
LPSTR LangName)
|
LPSTR LangName)
|
||||||
{
|
{
|
||||||
LONG rc = ERROR_SUCCESS;
|
LONG rc = ERROR_SUCCESS;
|
||||||
FRLDRHKEY hKey;
|
HKEY hKey;
|
||||||
WCHAR szIdBuffer[80];
|
WCHAR szIdBuffer[80];
|
||||||
WCHAR NameBuffer[80];
|
WCHAR NameBuffer[80];
|
||||||
ULONG BufferSize;
|
ULONG BufferSize;
|
||||||
|
@ -446,7 +446,7 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead,
|
||||||
IN LPCSTR DirectoryPath)
|
IN LPCSTR DirectoryPath)
|
||||||
{
|
{
|
||||||
LONG rc = 0;
|
LONG rc = 0;
|
||||||
FRLDRHKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey;
|
HKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey;
|
||||||
LPWSTR GroupNameBuffer;
|
LPWSTR GroupNameBuffer;
|
||||||
WCHAR ServiceName[256];
|
WCHAR ServiceName[256];
|
||||||
ULONG OrderList[128];
|
ULONG OrderList[128];
|
||||||
|
|
Loading…
Reference in a new issue