Author: hbelusca
Date: Thu Jan 14 20:00:18 2016
New Revision: 70594
URL:
http://svn.reactos.org/svn/reactos?rev=70594&view=rev
Log:
[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.
Modified:
trunk/reactos/boot/freeldr/freeldr/windows/registry.c
trunk/reactos/boot/freeldr/freeldr/windows/registry.h
trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c
Modified: trunk/reactos/boot/freeldr/freeldr/windows/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/registry.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/registry.c [iso-8859-1] Thu Jan 14 20:00:18
2016
@@ -27,7 +27,7 @@
static PCMHIVE CmHive;
static PCM_KEY_NODE RootKeyNode;
-static FRLDRHKEY CurrentControlSetKey;
+static HKEY CurrentControlSetKey;
BOOLEAN
RegImportBinaryHive(
@@ -77,8 +77,8 @@
_In_ BOOLEAN LastKnownGood)
{
WCHAR ControlSetKeyName[80];
- FRLDRHKEY SelectKey;
- FRLDRHKEY SystemKey;
+ HKEY SelectKey;
+ HKEY SystemKey;
ULONG CurrentSet = 0;
ULONG DefaultSet = 0;
ULONG LastKnownGoodSet = 0;
@@ -261,11 +261,11 @@
LONG
RegEnumKey(
- _In_ FRLDRHKEY Key,
+ _In_ HKEY Key,
_In_ ULONG Index,
_Out_ PWCHAR Name,
_Inout_ ULONG* NameSize,
- _Out_opt_ FRLDRHKEY *SubKey)
+ _Out_opt_ PHKEY SubKey)
{
PHHIVE Hive = &CmHive->Hive;
PCM_KEY_NODE KeyNode, SubKeyNode;
@@ -307,7 +307,7 @@
if (SubKey != NULL)
{
- *SubKey = (FRLDRHKEY)SubKeyNode;
+ *SubKey = (HKEY)SubKeyNode;
}
TRACE("RegEnumKey done -> %u, '%.*s'\n", *NameSize, *NameSize,
Name);
@@ -316,9 +316,9 @@
LONG
RegOpenKey(
- _In_ FRLDRHKEY ParentKey,
+ _In_ HKEY ParentKey,
_In_z_ PCWSTR KeyName,
- _Out_ PFRLDRHKEY Key)
+ _Out_ PHKEY Key)
{
UNICODE_STRING RemainingPath, SubKeyName;
UNICODE_STRING CurrentControlSet =
RTL_CONSTANT_STRING(L"CurrentControlSet");
@@ -420,7 +420,7 @@
}
TRACE("RegOpenKey done\n");
- *Key = (FRLDRHKEY)KeyNode;
+ *Key = (HKEY)KeyNode;
return ERROR_SUCCESS;
}
@@ -445,14 +445,14 @@
if (DataSize != NULL)
{
/* 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? */
if ((Data != NULL) && (*DataSize != 0))
{
/* Check where the data is stored */
if ((DataLength <= sizeof(HCELL_INDEX)) &&
- (ValueCell->DataLength & REG_DATA_IN_OFFSET))
+ (ValueCell->DataLength & CM_KEY_VALUE_SPECIAL_SIZE))
{
/* The data member contains the data */
RtlCopyMemory(Data,
@@ -477,7 +477,7 @@
LONG
RegQueryValue(
- _In_ FRLDRHKEY Key,
+ _In_ HKEY Key,
_In_z_ PCWSTR ValueName,
_Out_opt_ ULONG* Type,
_Out_opt_ PUCHAR Data,
@@ -532,7 +532,7 @@
LONG
RegEnumValue(
- _In_ FRLDRHKEY Key,
+ _In_ HKEY Key,
_In_ ULONG Index,
_Out_ PWCHAR ValueName,
_Inout_ ULONG* NameSize,
Modified: trunk/reactos/boot/freeldr/freeldr/windows/registry.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/registry.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/registry.h [iso-8859-1] Thu Jan 14 20:00:18
2016
@@ -21,43 +21,7 @@
#ifndef __REGISTRY_H
#define __REGISTRY_H
-#define TAG_REG_NAME 'NgeR'
-#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;
+typedef HANDLE HKEY, *PHKEY;
VOID
RegInitializeRegistry(VOID);
@@ -67,37 +31,33 @@
LONG
RegEnumKey(
- _In_ FRLDRHKEY Key,
+ _In_ HKEY Key,
_In_ ULONG Index,
_Out_ PWCHAR Name,
_Inout_ ULONG* NameSize,
- _Out_opt_ FRLDRHKEY *SubKey);
+ _Out_opt_ PHKEY SubKey);
LONG
-RegOpenKey(FRLDRHKEY ParentKey,
+RegOpenKey(HKEY ParentKey,
PCWSTR KeyName,
- PFRLDRHKEY Key);
+ PHKEY Key);
LONG
-RegSetValue(FRLDRHKEY Key,
+RegSetValue(HKEY Key,
PCWSTR ValueName,
ULONG Type,
PCSTR Data,
ULONG DataSize);
LONG
-RegQueryValue(FRLDRHKEY Key,
+RegQueryValue(HKEY Key,
PCWSTR ValueName,
ULONG* Type,
PUCHAR Data,
ULONG* DataSize);
LONG
-RegDeleteValue(FRLDRHKEY Key,
- PCWSTR ValueName);
-
-LONG
-RegEnumValue(FRLDRHKEY Key,
+RegEnumValue(HKEY Key,
ULONG Index,
PWCHAR ValueName,
ULONG* NameSize,
@@ -105,22 +65,9 @@
PUCHAR Data,
ULONG* DataSize);
-ULONG
-RegGetSubKeyCount (FRLDRHKEY Key);
-
-ULONG
-RegGetValueCount (FRLDRHKEY Key);
-
-
BOOLEAN
-RegImportBinaryHive (PCHAR ChunkBase,
+RegImportBinaryHive(PCHAR ChunkBase,
ULONG ChunkSize);
-
-BOOLEAN
-RegExportBinaryHive (PCWSTR KeyName,
- PCHAR ChunkBase,
- ULONG* ChunkSize);
-
#endif /* __REGISTRY_H */
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Thu Jan 14 20:00:18
2016
@@ -411,7 +411,7 @@
WinLdrDetectVersion(VOID)
{
LONG rc;
- FRLDRHKEY hKey;
+ HKEY hKey;
rc = RegOpenKey(
NULL,
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] Thu Jan 14
20:00:18 2016
@@ -196,7 +196,7 @@
LPSTR LangName)
{
LONG rc = ERROR_SUCCESS;
- FRLDRHKEY hKey;
+ HKEY hKey;
WCHAR szIdBuffer[80];
WCHAR NameBuffer[80];
ULONG BufferSize;
@@ -446,7 +446,7 @@
IN LPCSTR DirectoryPath)
{
LONG rc = 0;
- FRLDRHKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey;
+ HKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey;
LPWSTR GroupNameBuffer;
WCHAR ServiceName[256];
ULONG OrderList[128];