Author: ion
Date: Mon Aug 14 18:16:00 2006
New Revision: 23578
URL:
http://svn.reactos.org/svn/reactos?rev=23578&view=rev
Log:
- Make HHIVE part of EREGISTRY_HIVE, similarly to NT.
- Get rid of Opaque member and paramter..
Modified:
trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
trunk/reactos/lib/cmlib/cmlib.h
trunk/reactos/lib/cmlib/hiveinit.c
trunk/reactos/ntoskrnl/cm/cm.h
trunk/reactos/ntoskrnl/cm/import.c
trunk/reactos/ntoskrnl/cm/ntfunc.c
trunk/reactos/ntoskrnl/cm/regfile.c
trunk/reactos/ntoskrnl/cm/registry.c
trunk/reactos/ntoskrnl/cm/regobj.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c Mon Aug 14 18:16:00 2006
@@ -707,21 +707,24 @@
FRLDRHKEY SystemKey;
ULONG i;
LONG Error;
+ PEREGISTRY_HIVE CmHive;
PHHIVE Hive;
NTSTATUS Status;
DbgPrint((DPRINT_REGISTRY, "RegImportBinaryHive(%x, %u)
called\n",ChunkBase,ChunkSize));
- Status = HvInitialize (&Hive, HV_OPERATION_MEMORY_INPLACE,
+ CmHive = CmpAllocate(sizeof(EREGISTRY_HIVE), TRUE);
+ Status = HvInitialize (&CmHive->Hive, HV_OPERATION_MEMORY_INPLACE,
(ULONG_PTR)ChunkBase, ChunkSize,
CmpAllocate, CmpFree,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
if (!NT_SUCCESS(Status))
{
DbgPrint((DPRINT_REGISTRY, "Invalid hive id!\n"));
return FALSE;
}
+ Hive = &CmHive->Hive;
KeyCell = HvGetCell (Hive, Hive->HiveHeader->RootCell);
DbgPrint((DPRINT_REGISTRY, "KeyCell: %x\n", KeyCell));
DbgPrint((DPRINT_REGISTRY, "KeyCell->Id: %x\n", KeyCell->Id));
@@ -803,14 +806,17 @@
PCHAR ChunkBase,
ULONG* ChunkSize)
{
+ PEREGISTRY_HIVE CmHive;
PHHIVE Hive;
NTSTATUS Status;
DbgPrint((DPRINT_REGISTRY, "Creating binary hardware hive\n"));
- Status = HvInitialize (&Hive, HV_OPERATION_CREATE_HIVE, 0, 0,
+ CmHive = CmpAllocate(sizeof(EREGISTRY_HIVE), TRUE);
+ Status = HvInitialize (&CmHive->Hive, HV_OPERATION_CREATE_HIVE, 0, 0,
CmpAllocate, CmpFree,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
+ Hive = &CmHive->Hive;
if (!NT_SUCCESS(Status))
{
return FALSE;
Modified: trunk/reactos/lib/cmlib/cmlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=2357…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.h (original)
+++ trunk/reactos/lib/cmlib/cmlib.h Mon Aug 14 18:16:00 2006
@@ -115,8 +115,19 @@
ULONG StorageTypeCount;
ULONG Version;
DUAL Storage[HvMaxStorageType];
- PVOID Opaque; // FIXME: KILL!
} HHIVE, *PHHIVE;
+
+typedef struct _EREGISTRY_HIVE
+{
+ HHIVE Hive;
+ LIST_ENTRY HiveList;
+ UNICODE_STRING HiveFileName;
+ UNICODE_STRING LogFileName;
+ PCM_KEY_SECURITY RootSecurityCell;
+ ULONG Flags;
+ HANDLE HiveHandle;
+ HANDLE LogHandle;
+} EREGISTRY_HIVE, *PEREGISTRY_HIVE;
/*
* Public functions.
@@ -128,7 +139,7 @@
NTSTATUS CMAPI
HvInitialize(
- PHHIVE *RegistryHive,
+ PHHIVE RegistryHive,
ULONG Operation,
ULONG_PTR HiveData OPTIONAL,
SIZE_T Cluster, // HACK!!
@@ -138,7 +149,6 @@
PFILE_WRITE_ROUTINE FileWrite,
PFILE_SET_SIZE_ROUTINE FileSetSize,
PFILE_FLUSH_ROUTINE FileFlush,
- PVOID Opaque, // HACK!!
IN PUNICODE_STRING FileName);
VOID CMAPI
Modified: trunk/reactos/lib/cmlib/hiveinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hiveinit.c?rev=2…
==============================================================================
--- trunk/reactos/lib/cmlib/hiveinit.c (original)
+++ trunk/reactos/lib/cmlib/hiveinit.c Mon Aug 14 18:16:00 2006
@@ -299,7 +299,7 @@
NTSTATUS CMAPI
HvInitialize(
- PHHIVE *RegistryHive,
+ PHHIVE RegistryHive,
ULONG Operation,
ULONG_PTR ChunkBase,
SIZE_T ChunkSize,
@@ -309,19 +309,15 @@
PFILE_WRITE_ROUTINE FileWrite,
PFILE_SET_SIZE_ROUTINE FileSetSize,
PFILE_FLUSH_ROUTINE FileFlush,
- PVOID Opaque,
IN PUNICODE_STRING FileName)
{
NTSTATUS Status;
- PHHIVE Hive;
+ PHHIVE Hive = RegistryHive;
/*
* Create a new hive structure that will hold all the maintenance data.
*/
- Hive = Allocate(sizeof(HHIVE), TRUE);
- if (Hive == NULL)
- return STATUS_NO_MEMORY;
RtlZeroMemory(Hive, sizeof(HHIVE));
Hive->Allocate = Allocate;
@@ -330,7 +326,6 @@
Hive->FileWrite = FileWrite;
Hive->FileSetSize = FileSetSize;
Hive->FileFlush = FileFlush;
- Hive->Opaque = Opaque;
switch (Operation)
{
@@ -358,8 +353,6 @@
return Status;
}
- *RegistryHive = Hive;
-
return Status;
}
Modified: trunk/reactos/ntoskrnl/cm/cm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/cm.h?rev=23578…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/cm.h (original)
+++ trunk/reactos/ntoskrnl/cm/cm.h Mon Aug 14 18:16:00 2006
@@ -37,18 +37,6 @@
#define REG_SAM_FILE_NAME L"\\sam"
#define REG_SEC_FILE_NAME L"\\security"
-typedef struct _EREGISTRY_HIVE
-{
- LIST_ENTRY HiveList;
- PHHIVE Hive;
- UNICODE_STRING HiveFileName;
- UNICODE_STRING LogFileName;
- PCM_KEY_SECURITY RootSecurityCell;
- ULONG Flags;
- HANDLE HiveHandle;
- HANDLE LogHandle;
-} EREGISTRY_HIVE, *PEREGISTRY_HIVE;
-
/* When set, the hive is not backed by a file.
Therefore, it can not be flushed to disk. */
#define HIVE_NO_FILE 0x00000002
Modified: trunk/reactos/ntoskrnl/cm/import.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/import.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/import.c (original)
+++ trunk/reactos/ntoskrnl/cm/import.c Mon Aug 14 18:16:00 2006
@@ -55,7 +55,7 @@
(ULONG_PTR)ChunkBase, ChunkSize,
CmpAllocate, CmpFree,
CmpFileRead, CmpFileWrite, CmpFileSetSize,
- CmpFileFlush, Hive, NULL);
+ CmpFileFlush, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1 ("Opening hive failed (%x)\n", Status);
@@ -63,7 +63,7 @@
return FALSE;
}
- CmPrepareHive(Hive->Hive);
+ CmPrepareHive(&Hive->Hive);
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/ntfunc.c (original)
+++ trunk/reactos/ntoskrnl/cm/ntfunc.c Mon Aug 14 18:16:00 2006
@@ -781,7 +781,7 @@
}
ASSERT(KeyCell->SubKeyLists[Storage] != HCELL_NULL);
- HashTableBlock = HvGetCell (RegistryHive->Hive, KeyCell->SubKeyLists[Storage]);
+ HashTableBlock = HvGetCell (&RegistryHive->Hive,
KeyCell->SubKeyLists[Storage]);
SubKeyCell = CmiGetKeyFromHashByIndex(RegistryHive,
HashTableBlock,
@@ -899,7 +899,7 @@
if (ClassSize != 0)
{
- ClassCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ ClassCell = HvGetCell (&KeyObject->RegistryHive->Hive,
SubKeyCell->ClassNameOffset);
RtlCopyMemory (NodeInformation->Name + SubKeyCell->NameSize,
ClassCell,
@@ -947,7 +947,7 @@
if (ClassSize != 0)
{
- ClassCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ ClassCell = HvGetCell (&KeyObject->RegistryHive->Hive,
SubKeyCell->ClassNameOffset);
RtlCopyMemory (FullInformation->Class,
ClassCell,
@@ -1117,7 +1117,7 @@
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
- DataCell = HvGetCell (RegistryHive->Hive, ValueCell->DataOffset);
+ DataCell = HvGetCell (&RegistryHive->Hive,
ValueCell->DataOffset);
RtlCopyMemory(ValuePartialInformation->Data,
DataCell,
DataSize);
@@ -1190,7 +1190,7 @@
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
- DataCell = HvGetCell (RegistryHive->Hive,
ValueCell->DataOffset);
+ DataCell = HvGetCell (&RegistryHive->Hive,
ValueCell->DataOffset);
RtlCopyMemory((PCHAR) ValueFullInformation
+ ValueFullInformation->DataOffset,
DataCell, DataSize);
@@ -1574,7 +1574,7 @@
if (ClassSize != 0)
{
- ClassCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ ClassCell = HvGetCell (&KeyObject->RegistryHive->Hive,
KeyCell->ClassNameOffset);
RtlCopyMemory (NodeInformation->Name + KeyObject->Name.Length,
ClassCell,
@@ -1621,7 +1621,7 @@
if (ClassSize)
{
- ClassCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ ClassCell = HvGetCell (&KeyObject->RegistryHive->Hive,
KeyCell->ClassNameOffset);
RtlCopyMemory (FullInformation->Class,
ClassCell, ClassSize);
@@ -1806,7 +1806,7 @@
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
- DataCell = HvGetCell (RegistryHive->Hive, ValueCell->DataOffset);
+ DataCell = HvGetCell (&RegistryHive->Hive, ValueCell->DataOffset);
RtlCopyMemory(ValuePartialInformation->Data,
DataCell,
DataSize);
@@ -1881,7 +1881,7 @@
}
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
- DataCell = HvGetCell (RegistryHive->Hive, ValueCell->DataOffset);
+ DataCell = HvGetCell (&RegistryHive->Hive, ValueCell->DataOffset);
RtlCopyMemory((PCHAR) ValueFullInformation
+ ValueFullInformation->DataOffset,
DataCell,
@@ -2010,8 +2010,8 @@
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) &&
(ValueCell->DataSize & REG_DATA_SIZE_MASK) != 0)
{
- DataCell = HvGetCell (RegistryHive->Hive, ValueCell->DataOffset);
- DataCellSize = -HvGetCellSize (RegistryHive->Hive, DataCell);
+ DataCell = HvGetCell (&RegistryHive->Hive, ValueCell->DataOffset);
+ DataCellSize = -HvGetCellSize (&RegistryHive->Hive, DataCell);
}
else
{
@@ -2026,13 +2026,13 @@
DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize);
if (DataCell)
{
- HvFreeCell(RegistryHive->Hive, ValueCell->DataOffset);
+ HvFreeCell(&RegistryHive->Hive, ValueCell->DataOffset);
}
RtlCopyMemory(&ValueCell->DataOffset, Data, DataSize);
ValueCell->DataSize = DataSize | REG_DATA_IN_OFFSET;
ValueCell->DataType = Type;
- HvMarkCellDirty(RegistryHive->Hive, ValueCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, ValueCellOffset);
}
else
{
@@ -2046,7 +2046,7 @@
DPRINT("ValueCell->DataSize %lu\n", ValueCell->DataSize);
- NewOffset = HvAllocateCell (RegistryHive->Hive, DataSize, HvStable);
+ NewOffset = HvAllocateCell (&RegistryHive->Hive, DataSize, HvStable);
if (NewOffset == HCELL_NULL)
{
DPRINT("CmiAllocateBlock() failed (Status %lx)\n", Status);
@@ -2062,18 +2062,18 @@
if (DataCell)
{
- HvFreeCell(RegistryHive->Hive, ValueCell->DataOffset);
+ HvFreeCell(&RegistryHive->Hive, ValueCell->DataOffset);
}
ValueCell->DataOffset = NewOffset;
- DataCell = HvGetCell(RegistryHive->Hive, NewOffset);
+ DataCell = HvGetCell(&RegistryHive->Hive, NewOffset);
}
RtlCopyMemory(DataCell, Data, DataSize);
ValueCell->DataSize = DataSize & REG_DATA_SIZE_MASK;
ValueCell->DataType = Type;
- HvMarkCellDirty(RegistryHive->Hive, ValueCell->DataOffset);
- HvMarkCellDirty(RegistryHive->Hive, ValueCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, ValueCell->DataOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, ValueCellOffset);
}
/* Mark link key */
@@ -2084,7 +2084,7 @@
}
KeQuerySystemTime (&KeyCell->LastWriteTime);
- HvMarkCellDirty (RegistryHive->Hive, KeyObject->KeyCellOffset);
+ HvMarkCellDirty (&RegistryHive->Hive, KeyObject->KeyCellOffset);
ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
@@ -2160,7 +2160,7 @@
ValueName);
KeQuerySystemTime (&KeyObject->KeyCell->LastWriteTime);
- HvMarkCellDirty (KeyObject->RegistryHive->Hive, KeyObject->KeyCellOffset);
+ HvMarkCellDirty (&KeyObject->RegistryHive->Hive,
KeyObject->KeyCellOffset);
/* Release hive lock */
ExReleaseResourceLite(&CmiRegistryLock);
@@ -2461,7 +2461,7 @@
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
- DataCell = HvGetCell (RegistryHive->Hive,
+ DataCell = HvGetCell (&RegistryHive->Hive,
ValueCell->DataOffset);
RtlCopyMemory(DataPtr, DataCell,
ValueCell->DataSize & REG_DATA_SIZE_MASK);
@@ -2685,7 +2685,7 @@
KeyObject->KeyCell->LastWriteTime.QuadPart =
((PKEY_WRITE_TIME_INFORMATION)KeyInformation)->LastWriteTime.QuadPart;
- HvMarkCellDirty (KeyObject->RegistryHive->Hive,
+ HvMarkCellDirty (&KeyObject->RegistryHive->Hive,
KeyObject->KeyCellOffset);
/* Release hive lock */
Modified: trunk/reactos/ntoskrnl/cm/regfile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regfile.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/regfile.c (original)
+++ trunk/reactos/ntoskrnl/cm/regfile.c Mon Aug 14 18:16:00 2006
@@ -50,7 +50,7 @@
PVOID Buffer,
ULONG BufferLength)
{
- PEREGISTRY_HIVE CmHive = RegistryHive->Opaque;
+ PEREGISTRY_HIVE CmHive = (PEREGISTRY_HIVE)RegistryHive;
HANDLE HiveHandle = FileType == HV_TYPE_PRIMARY ? CmHive->HiveHandle :
CmHive->LogHandle;
LARGE_INTEGER _FileOffset;
IO_STATUS_BLOCK IoStatusBlock;
@@ -71,7 +71,7 @@
PVOID Buffer,
ULONG BufferLength)
{
- PEREGISTRY_HIVE CmHive = RegistryHive->Opaque;
+ PEREGISTRY_HIVE CmHive = (PEREGISTRY_HIVE)RegistryHive;
HANDLE HiveHandle = FileType == HV_TYPE_PRIMARY ? CmHive->HiveHandle :
CmHive->LogHandle;
LARGE_INTEGER _FileOffset;
IO_STATUS_BLOCK IoStatusBlock;
@@ -90,7 +90,7 @@
ULONG FileType,
ULONG FileSize)
{
- PEREGISTRY_HIVE CmHive = RegistryHive->Opaque;
+ PEREGISTRY_HIVE CmHive = (PEREGISTRY_HIVE)RegistryHive;
HANDLE HiveHandle = FileType == HV_TYPE_PRIMARY ? CmHive->HiveHandle :
CmHive->LogHandle;
FILE_END_OF_FILE_INFORMATION EndOfFileInfo;
FILE_ALLOCATION_INFORMATION FileAllocationInfo;
@@ -122,7 +122,7 @@
PHHIVE RegistryHive,
ULONG FileType)
{
- PEREGISTRY_HIVE CmHive = RegistryHive->Opaque;
+ PEREGISTRY_HIVE CmHive = (PEREGISTRY_HIVE)RegistryHive;
HANDLE HiveHandle = FileType == HV_TYPE_PRIMARY ? CmHive->HiveHandle :
CmHive->LogHandle;
IO_STATUS_BLOCK IoStatusBlock;
NTSTATUS Status;
@@ -135,21 +135,23 @@
static NTSTATUS
CmiCreateNewRegFile(HANDLE FileHandle)
{
- EREGISTRY_HIVE CmHive;
+ PEREGISTRY_HIVE CmHive;
PHHIVE Hive;
NTSTATUS Status;
- CmHive.HiveHandle = FileHandle;
- Status = HvInitialize(&Hive, HV_OPERATION_CREATE_HIVE, 0, 0,
+ CmHive = CmpAllocate(sizeof(EREGISTRY_HIVE), TRUE);
+ CmHive->HiveHandle = FileHandle;
+ Status = HvInitialize(&CmHive->Hive, HV_OPERATION_CREATE_HIVE, 0, 0,
CmpAllocate, CmpFree,
CmpFileRead, CmpFileWrite, CmpFileSetSize,
- CmpFileFlush, &CmHive, NULL);
+ CmpFileFlush, NULL);
if (!NT_SUCCESS(Status))
{
return FALSE;
}
/* Init root key cell */
+ Hive = &CmHive->Hive;
if (!CmCreateRootNode(Hive, L""))
{
HvFree (Hive);
@@ -571,7 +573,7 @@
(ULONG_PTR)ViewBase, ViewSize,
CmpAllocate, CmpFree,
CmpFileRead, CmpFileWrite, CmpFileSetSize,
- CmpFileFlush, RegistryHive, NULL);
+ CmpFileFlush, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to open hive\n");
@@ -584,7 +586,7 @@
return Status;
}
- CmPrepareHive(RegistryHive->Hive);
+ CmPrepareHive(&RegistryHive->Hive);
/* Unmap and dereference the hive section */
MmUnmapViewOfSection(PsGetCurrentProcess(),
@@ -622,16 +624,16 @@
Status = HvInitialize(&Hive->Hive, HV_OPERATION_CREATE_HIVE, 0, 0,
CmpAllocate, CmpFree,
CmpFileRead, CmpFileWrite, CmpFileSetSize,
- CmpFileFlush, Hive, NULL);
+ CmpFileFlush, NULL);
if (!NT_SUCCESS(Status))
{
ExFreePool (Hive);
return Status;
}
- if (!CmCreateRootNode (Hive->Hive, L""))
- {
- HvFree (Hive->Hive);
+ if (!CmCreateRootNode (&Hive->Hive, L""))
+ {
+ HvFree (&Hive->Hive);
ExFreePool (Hive);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -732,7 +734,7 @@
RtlFreeUnicodeString (&RegistryHive->LogFileName);
/* Release hive */
- HvFree (RegistryHive->Hive);
+ HvFree (&RegistryHive->Hive);
return STATUS_SUCCESS;
}
@@ -810,7 +812,7 @@
ASSERT(!IsNoFileHive(RegistryHive));
- if (RtlFindSetBits(&RegistryHive->Hive->DirtyVector, 1, 0) == ~0)
+ if (RtlFindSetBits(&RegistryHive->Hive.DirtyVector, 1, 0) == ~0)
{
return(STATUS_SUCCESS);
}
@@ -821,7 +823,7 @@
return Status;
}
- Success = HvSyncHive(RegistryHive->Hive);
+ Success = HvSyncHive(&RegistryHive->Hive);
CmCloseHiveFiles(RegistryHive);
@@ -869,12 +871,12 @@
{
if (KeyCell->SubKeyLists[Storage] != HCELL_NULL)
{
- HashBlock = HvGetCell (KeyObject->RegistryHive->Hive,
KeyCell->SubKeyLists[Storage]);
+ HashBlock = HvGetCell (&KeyObject->RegistryHive->Hive,
KeyCell->SubKeyLists[Storage]);
ASSERT(HashBlock->Id == REG_HASH_TABLE_CELL_ID);
for (i = 0; i < KeyCell->SubKeyCounts[Storage]; i++)
{
- CurSubKeyCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ CurSubKeyCell = HvGetCell (&KeyObject->RegistryHive->Hive,
HashBlock->Table[i].KeyOffset);
NameSize = CurSubKeyCell->NameSize;
if (CurSubKeyCell->Flags & REG_KEY_NAME_PACKED)
@@ -911,13 +913,13 @@
{
if (KeyCell->SubKeyLists[Storage] != HCELL_NULL)
{
- HashBlock = HvGetCell (KeyObject->RegistryHive->Hive,
+ HashBlock = HvGetCell (&KeyObject->RegistryHive->Hive,
KeyCell->SubKeyLists[Storage]);
ASSERT(HashBlock->Id == REG_HASH_TABLE_CELL_ID);
for (i = 0; i < KeyCell->SubKeyCounts[Storage]; i++)
{
- CurSubKeyCell = HvGetCell (KeyObject->RegistryHive->Hive,
+ CurSubKeyCell = HvGetCell (&KeyObject->RegistryHive->Hive,
HashBlock->Table[i].KeyOffset);
if (MaxClass < CurSubKeyCell->ClassSize)
@@ -950,12 +952,12 @@
}
MaxValueName = 0;
- ValueListCell = HvGetCell (RegistryHive->Hive,
+ ValueListCell = HvGetCell (&RegistryHive->Hive,
KeyCell->ValueList.List);
for (i = 0; i < KeyCell->ValueList.Count; i++)
{
- CurValueCell = HvGetCell (RegistryHive->Hive,
+ CurValueCell = HvGetCell (&RegistryHive->Hive,
ValueListCell->ValueOffset[i]);
if (CurValueCell == NULL)
{
@@ -997,11 +999,11 @@
}
MaxValueData = 0;
- ValueListCell = HvGetCell (RegistryHive->Hive, KeyCell->ValueList.List);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, KeyCell->ValueList.List);
for (i = 0; i < KeyCell->ValueList.Count; i++)
{
- CurValueCell = HvGetCell (RegistryHive->Hive,
+ CurValueCell = HvGetCell (&RegistryHive->Hive,
ValueListCell->ValueOffset[i]);
if ((MaxValueData < (LONG)(CurValueCell->DataSize &
REG_DATA_SIZE_MASK)))
{
@@ -1044,7 +1046,7 @@
}
/* Get hash table */
- HashBlock = HvGetCell (RegistryHive->Hive, KeyCell->SubKeyLists[Storage]);
+ HashBlock = HvGetCell (&RegistryHive->Hive,
KeyCell->SubKeyLists[Storage]);
ASSERT(HashBlock->Id == REG_HASH_TABLE_CELL_ID);
for (i = 0; i < KeyCell->SubKeyCounts[Storage]; i++)
@@ -1054,7 +1056,7 @@
if ((HashBlock->Table[i].HashValue == 0 ||
CmiCompareHashI(KeyName,
(PCHAR)&HashBlock->Table[i].HashValue)))
{
- CurSubKeyCell = HvGetCell (RegistryHive->Hive,
+ CurSubKeyCell = HvGetCell (&RegistryHive->Hive,
HashBlock->Table[i].KeyOffset);
if (CmiCompareKeyNamesI(KeyName, CurSubKeyCell))
@@ -1070,7 +1072,7 @@
if ((HashBlock->Table[i].HashValue == 0 ||
CmiCompareHash(KeyName,
(PCHAR)&HashBlock->Table[i].HashValue)))
{
- CurSubKeyCell = HvGetCell (RegistryHive->Hive,
+ CurSubKeyCell = HvGetCell (&RegistryHive->Hive,
HashBlock->Table[i].KeyOffset);
if (CmiCompareKeyNames(KeyName, CurSubKeyCell))
@@ -1149,14 +1151,14 @@
Storage = (CreateOptions & REG_OPTION_VOLATILE) ? HvVolatile : HvStable;
NewBlockSize = sizeof(CM_KEY_NODE) + NameSize;
- NKBOffset = HvAllocateCell (RegistryHive->Hive, NewBlockSize, Storage);
+ NKBOffset = HvAllocateCell (&RegistryHive->Hive, NewBlockSize, Storage);
if (NKBOffset == HCELL_NULL)
{
Status = STATUS_INSUFFICIENT_RESOURCES;
}
else
{
- NewKeyCell = HvGetCell (RegistryHive->Hive, NKBOffset);
+ NewKeyCell = HvGetCell (&RegistryHive->Hive, NKBOffset);
NewKeyCell->Id = REG_KEY_CELL_ID;
if (CreateOptions & REG_OPTION_VOLATILE)
{
@@ -1200,10 +1202,10 @@
{
NewKeyCell->ClassSize = Class->Length;
NewKeyCell->ClassNameOffset = HvAllocateCell(
- RegistryHive->Hive, NewKeyCell->ClassSize, HvStable);
+ &RegistryHive->Hive, NewKeyCell->ClassSize, HvStable);
ASSERT(NewKeyCell->ClassNameOffset != HCELL_NULL); /* FIXME */
- ClassCell = HvGetCell(RegistryHive->Hive, NewKeyCell->ClassNameOffset);
+ ClassCell = HvGetCell(&RegistryHive->Hive, NewKeyCell->ClassNameOffset);
RtlCopyMemory (ClassCell,
Class->Buffer,
Class->Length);
@@ -1232,7 +1234,7 @@
}
else
{
- HashBlock = HvGetCell (RegistryHive->Hive,
+ HashBlock = HvGetCell (&RegistryHive->Hive,
ParentKeyCell->SubKeyLists[Storage]);
ASSERT(HashBlock->Id == REG_HASH_TABLE_CELL_ID);
@@ -1258,7 +1260,7 @@
RtlCopyMemory(&NewHashBlock->Table[0],
&HashBlock->Table[0],
sizeof(NewHashBlock->Table[0]) * HashBlock->HashTableSize);
- HvFreeCell (RegistryHive->Hive, ParentKeyCell->SubKeyLists[Storage]);
+ HvFreeCell (&RegistryHive->Hive, ParentKeyCell->SubKeyLists[Storage]);
ParentKeyCell->SubKeyLists[Storage] = HTOffset;
HashBlock = NewHashBlock;
}
@@ -1276,7 +1278,7 @@
}
KeQuerySystemTime (&ParentKeyCell->LastWriteTime);
- HvMarkCellDirty (RegistryHive->Hive, ParentKey->KeyCellOffset);
+ HvMarkCellDirty (&RegistryHive->Hive, ParentKey->KeyCellOffset);
return(Status);
}
@@ -1301,13 +1303,13 @@
if (SubKey->KeyCell->ValueList.Count != 0)
{
/* Get pointer to the value list cell */
- ValueList = HvGetCell (RegistryHive->Hive,
SubKey->KeyCell->ValueList.List);
+ ValueList = HvGetCell (&RegistryHive->Hive,
SubKey->KeyCell->ValueList.List);
/* Enumerate all values */
for (i = 0; i < SubKey->KeyCell->ValueList.Count; i++)
{
/* Get pointer to value cell */
- ValueCell = HvGetCell(RegistryHive->Hive,
+ ValueCell = HvGetCell(&RegistryHive->Hive,
ValueList->ValueOffset[i]);
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET)
@@ -1315,34 +1317,34 @@
&& ValueCell->DataOffset != HCELL_NULL)
{
/* Destroy data cell */
- HvFreeCell (RegistryHive->Hive, ValueCell->DataOffset);
+ HvFreeCell (&RegistryHive->Hive, ValueCell->DataOffset);
}
/* Destroy value cell */
- HvFreeCell (RegistryHive->Hive, ValueList->ValueOffset[i]);
+ HvFreeCell (&RegistryHive->Hive, ValueList->ValueOffset[i]);
}
/* Destroy value list cell */
- HvFreeCell (RegistryHive->Hive, SubKey->KeyCell->ValueList.List);
+ HvFreeCell (&RegistryHive->Hive, SubKey->KeyCell->ValueList.List);
SubKey->KeyCell->ValueList.Count = 0;
SubKey->KeyCell->ValueList.List = (HCELL_INDEX)-1;
- HvMarkCellDirty(RegistryHive->Hive, SubKey->KeyCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, SubKey->KeyCellOffset);
}
/* Remove the key from the parent key's hash block */
if (ParentKey->KeyCell->SubKeyLists[Storage] != HCELL_NULL)
{
DPRINT("ParentKey SubKeyLists %lx\n",
ParentKey->KeyCell->SubKeyLists[Storage]);
- HashBlock = HvGetCell (ParentKey->RegistryHive->Hive,
+ HashBlock = HvGetCell (&ParentKey->RegistryHive->Hive,
ParentKey->KeyCell->SubKeyLists[Storage]);
ASSERT(HashBlock->Id == REG_HASH_TABLE_CELL_ID);
DPRINT("ParentKey HashBlock %p\n", HashBlock);
CmiRemoveKeyFromHashTable(ParentKey->RegistryHive,
HashBlock,
SubKey->KeyCellOffset);
- HvMarkCellDirty(ParentKey->RegistryHive->Hive,
+ HvMarkCellDirty(&ParentKey->RegistryHive->Hive,
ParentKey->KeyCell->SubKeyLists[Storage]);
}
@@ -1350,7 +1352,7 @@
if (SubKey->KeyCell->SubKeyLists[Storage] != HCELL_NULL)
{
DPRINT("SubKey SubKeyLists %lx\n",
SubKey->KeyCell->SubKeyLists[Storage]);
- HvFreeCell (RegistryHive->Hive, SubKey->KeyCell->SubKeyLists[Storage]);
+ HvFreeCell (&RegistryHive->Hive,
SubKey->KeyCell->SubKeyLists[Storage]);
SubKey->KeyCell->SubKeyLists[Storage] = HCELL_NULL;
}
@@ -1365,18 +1367,18 @@
ParentKey->KeyCell->SubKeyLists[Storage] != HCELL_NULL)
{
DPRINT("ParentKey SubKeyLists %lx\n",
ParentKey->KeyCell->SubKeyLists);
- HvFreeCell (ParentKey->RegistryHive->Hive,
+ HvFreeCell (&ParentKey->RegistryHive->Hive,
ParentKey->KeyCell->SubKeyLists[Storage]);
ParentKey->KeyCell->SubKeyLists[Storage] = HCELL_NULL;
}
KeQuerySystemTime(&ParentKey->KeyCell->LastWriteTime);
- HvMarkCellDirty(ParentKey->RegistryHive->Hive,
+ HvMarkCellDirty(&ParentKey->RegistryHive->Hive,
ParentKey->KeyCellOffset);
}
/* Destroy key cell */
- HvFreeCell (RegistryHive->Hive, SubKey->KeyCellOffset);
+ HvFreeCell (&RegistryHive->Hive, SubKey->KeyCellOffset);
SubKey->KeyCell = NULL;
SubKey->KeyCellOffset = (HCELL_INDEX)-1;
@@ -1407,13 +1409,13 @@
return STATUS_OBJECT_NAME_NOT_FOUND;
}
- ValueListCell = HvGetCell (RegistryHive->Hive, KeyCell->ValueList.List);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, KeyCell->ValueList.List);
VERIFY_VALUE_LIST_CELL(ValueListCell);
for (i = 0; i < KeyCell->ValueList.Count; i++)
{
- CurValueCell = HvGetCell (RegistryHive->Hive,
+ CurValueCell = HvGetCell (&RegistryHive->Hive,
ValueListCell->ValueOffset[i]);
if (CmiComparePackedNames(ValueName,
@@ -1455,11 +1457,11 @@
}
- ValueListCell = HvGetCell (RegistryHive->Hive, KeyCell->ValueList.List);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, KeyCell->ValueList.List);
VERIFY_VALUE_LIST_CELL(ValueListCell);
- CurValueCell = HvGetCell (RegistryHive->Hive,
ValueListCell->ValueOffset[Index]);
+ CurValueCell = HvGetCell (&RegistryHive->Hive,
ValueListCell->ValueOffset[Index]);
*ValueCell = CurValueCell;
@@ -1490,34 +1492,34 @@
{
CellSize = sizeof(VALUE_LIST_CELL) +
(3 * sizeof(HCELL_INDEX));
- ValueListCellOffset = HvAllocateCell (RegistryHive->Hive, CellSize, Storage);
+ ValueListCellOffset = HvAllocateCell (&RegistryHive->Hive, CellSize,
Storage);
if (ValueListCellOffset == HCELL_NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- ValueListCell = HvGetCell (RegistryHive->Hive, ValueListCellOffset);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, ValueListCellOffset);
KeyCell->ValueList.List = ValueListCellOffset;
- HvMarkCellDirty(RegistryHive->Hive, KeyCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, KeyCellOffset);
}
else
{
- ValueListCell = (PVALUE_LIST_CELL) HvGetCell (RegistryHive->Hive,
KeyCell->ValueList.List);
- CellSize = ABS_VALUE(HvGetCellSize(RegistryHive->Hive, ValueListCell));
+ ValueListCell = (PVALUE_LIST_CELL) HvGetCell (&RegistryHive->Hive,
KeyCell->ValueList.List);
+ CellSize = ABS_VALUE(HvGetCellSize(&RegistryHive->Hive, ValueListCell));
if (KeyCell->ValueList.Count >=
(CellSize / sizeof(HCELL_INDEX)))
{
CellSize *= 2;
- ValueListCellOffset = HvReallocateCell (RegistryHive->Hive,
KeyCell->ValueList.List, CellSize);
+ ValueListCellOffset = HvReallocateCell (&RegistryHive->Hive,
KeyCell->ValueList.List, CellSize);
if (ValueListCellOffset == HCELL_NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- ValueListCell = HvGetCell (RegistryHive->Hive, ValueListCellOffset);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, ValueListCellOffset);
KeyCell->ValueList.List = ValueListCellOffset;
- HvMarkCellDirty (RegistryHive->Hive, KeyCellOffset);
+ HvMarkCellDirty (&RegistryHive->Hive, KeyCellOffset);
}
}
@@ -1542,9 +1544,9 @@
ValueListCell->ValueOffset[KeyCell->ValueList.Count] = NewValueCellOffset;
KeyCell->ValueList.Count++;
- HvMarkCellDirty(RegistryHive->Hive, KeyCellOffset);
- HvMarkCellDirty(RegistryHive->Hive, KeyCell->ValueList.List);
- HvMarkCellDirty(RegistryHive->Hive, NewValueCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, KeyCellOffset);
+ HvMarkCellDirty(&RegistryHive->Hive, KeyCell->ValueList.List);
+ HvMarkCellDirty(&RegistryHive->Hive, NewValueCellOffset);
*pValueCell = NewValueCell;
*pValueCellOffset = NewValueCellOffset;
@@ -1569,13 +1571,13 @@
return STATUS_OBJECT_NAME_NOT_FOUND;
}
- ValueListCell = HvGetCell (RegistryHive->Hive, KeyCell->ValueList.List);
+ ValueListCell = HvGetCell (&RegistryHive->Hive, KeyCell->ValueList.List);
VERIFY_VALUE_LIST_CELL(ValueListCell);
for (i = 0; i < KeyCell->ValueList.Count; i++)
{
- CurValueCell = HvGetCell (RegistryHive->Hive,
ValueListCell->ValueOffset[i]);
+ CurValueCell = HvGetCell (&RegistryHive->Hive,
ValueListCell->ValueOffset[i]);
if (CmiComparePackedNames(ValueName,
CurValueCell->Name,
@@ -1604,16 +1606,16 @@
if (KeyCell->ValueList.Count == 0)
{
- HvFreeCell(RegistryHive->Hive, KeyCell->ValueList.List);
+ HvFreeCell(&RegistryHive->Hive, KeyCell->ValueList.List);
KeyCell->ValueList.List = -1;
}
else
{
- HvMarkCellDirty(RegistryHive->Hive,
+ HvMarkCellDirty(&RegistryHive->Hive,
KeyCell->ValueList.List);
}
- HvMarkCellDirty(RegistryHive->Hive,
+ HvMarkCellDirty(&RegistryHive->Hive,
KeyCellOffset);
return STATUS_SUCCESS;
@@ -1641,7 +1643,7 @@
*HashBlock = NULL;
NewHashSize = sizeof(HASH_TABLE_CELL) +
(SubKeyCount * sizeof(HASH_RECORD));
- *HBOffset = HvAllocateCell (RegistryHive->Hive, NewHashSize, Storage);
+ *HBOffset = HvAllocateCell (&RegistryHive->Hive, NewHashSize, Storage);
if (*HBOffset == HCELL_NULL)
{
@@ -1650,7 +1652,7 @@
else
{
ASSERT(SubKeyCount <= 0xffff); /* should really be USHORT_MAX or similar */
- NewHashBlock = HvGetCell (RegistryHive->Hive, *HBOffset);
+ NewHashBlock = HvGetCell (&RegistryHive->Hive, *HBOffset);
NewHashBlock->Id = REG_HASH_TABLE_CELL_ID;
NewHashBlock->HashTableSize = (USHORT)SubKeyCount;
*HashBlock = NewHashBlock;
@@ -1669,7 +1671,7 @@
PCM_KEY_NODE KeyCell;
KeyOffset = HashBlock->Table[Index].KeyOffset;
- KeyCell = HvGetCell (RegistryHive->Hive, KeyOffset);
+ KeyCell = HvGetCell (&RegistryHive->Hive, KeyOffset);
return KeyCell;
}
@@ -1693,7 +1695,7 @@
NewKeyCell->Name,
min(NewKeyCell->NameSize, sizeof(ULONG)));
}
- HvMarkCellDirty(RegistryHive->Hive, KeyCell->SubKeyLists[StorageType]);
+ HvMarkCellDirty(&RegistryHive->Hive, KeyCell->SubKeyLists[StorageType]);
return STATUS_SUCCESS;
}
@@ -1741,7 +1743,7 @@
DPRINT("ValueName->Length %lu NameSize %lu\n", ValueName->Length,
NameSize);
- *VBOffset = HvAllocateCell (RegistryHive->Hive, sizeof(CM_KEY_VALUE) + NameSize,
Storage);
+ *VBOffset = HvAllocateCell (&RegistryHive->Hive, sizeof(CM_KEY_VALUE) +
NameSize, Storage);
if (*VBOffset == HCELL_NULL)
{
Status = STATUS_INSUFFICIENT_RESOURCES;
@@ -1749,7 +1751,7 @@
else
{
ASSERT(NameSize <= 0xffff); /* should really be USHORT_MAX or similar */
- NewValueCell = HvGetCell (RegistryHive->Hive, *VBOffset);
+ NewValueCell = HvGetCell (&RegistryHive->Hive, *VBOffset);
NewValueCell->Id = REG_VALUE_CELL_ID;
NewValueCell->NameSize = (USHORT)NameSize;
if (Packable)
@@ -1792,11 +1794,11 @@
&& ValueCell->DataSize > sizeof(HCELL_INDEX)
&& ValueCell->DataOffset != HCELL_NULL)
{
- HvFreeCell (RegistryHive->Hive, ValueCell->DataOffset);
+ HvFreeCell (&RegistryHive->Hive, ValueCell->DataOffset);
}
/* Destroy the value cell */
- HvFreeCell (RegistryHive->Hive, ValueCellOffset);
+ HvFreeCell (&RegistryHive->Hive, ValueCellOffset);
return STATUS_SUCCESS;
}
@@ -2002,19 +2004,19 @@
{
/* Allocate and copy key cell */
NewKeyCellSize = sizeof(CM_KEY_NODE) + SrcKeyCell->NameSize;
- NewKeyCellOffset = HvAllocateCell (DstHive->Hive, NewKeyCellSize, HvStable);
+ NewKeyCellOffset = HvAllocateCell (&DstHive->Hive, NewKeyCellSize,
HvStable);
if (NewKeyCellOffset == HCELL_NULL)
{
DPRINT1 ("Failed to allocate a key cell\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewKeyCell = HvGetCell (DstHive->Hive, NewKeyCellOffset);
+ NewKeyCell = HvGetCell (&DstHive->Hive, NewKeyCellOffset);
RtlCopyMemory (NewKeyCell,
SrcKeyCell,
NewKeyCellSize);
- DstHive->Hive->HiveHeader->RootCell = NewKeyCellOffset;
+ DstHive->Hive.HiveHeader->RootCell = NewKeyCellOffset;
/* Copy class name */
if (SrcKeyCell->ClassNameOffset != (HCELL_INDEX) -1)
@@ -2023,17 +2025,17 @@
PVOID NewClassNameCell;
HCELL_INDEX NewClassNameOffset;
- SrcClassNameCell = HvGetCell (SrcHive->Hive, SrcKeyCell->ClassNameOffset);
+ SrcClassNameCell = HvGetCell (&SrcHive->Hive, SrcKeyCell->ClassNameOffset);
NewKeyCell->ClassSize = SrcKeyCell->ClassSize;
- NewClassNameOffset = HvAllocateCell (DstHive->Hive, NewKeyCell->ClassSize,
HvStable);
+ NewClassNameOffset = HvAllocateCell (&DstHive->Hive, NewKeyCell->ClassSize,
HvStable);
if (NewClassNameOffset == HCELL_NULL)
{
DPRINT1 ("CmiAllocateBlock() failed\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewClassNameCell = HvGetCell (DstHive->Hive, NewClassNameOffset);
+ NewClassNameCell = HvGetCell (&DstHive->Hive, NewClassNameOffset);
RtlCopyMemory (NewClassNameCell,
SrcClassNameCell,
NewKeyCell->ClassSize);
@@ -2083,7 +2085,7 @@
NewValueListCellSize =
ROUND_UP(SrcKeyCell->ValueList.Count, 4) * sizeof(HCELL_INDEX);
- NewKeyCell->ValueList.List = HvAllocateCell (DstHive->Hive,
+ NewKeyCell->ValueList.List = HvAllocateCell (&DstHive->Hive,
NewValueListCellSize,
HvStable);
if (NewKeyCell->ValueList.List == HCELL_NULL)
@@ -2093,26 +2095,26 @@
}
DPRINT1("KeyCell->ValueList.List: %x\n",
NewKeyCell->ValueList.List);
- NewValueListCell = HvGetCell (DstHive->Hive, NewKeyCell->ValueList.List);
+ NewValueListCell = HvGetCell (&DstHive->Hive,
NewKeyCell->ValueList.List);
RtlZeroMemory (NewValueListCell,
NewValueListCellSize);
/* Copy values */
- SrcValueListCell = HvGetCell (SrcHive->Hive, SrcKeyCell->ValueList.List);
+ SrcValueListCell = HvGetCell (&SrcHive->Hive,
SrcKeyCell->ValueList.List);
for (i = 0; i < SrcKeyCell->ValueList.Count; i++)
{
/* Copy value cell */
- SrcValueCell = HvGetCell (SrcHive->Hive, SrcValueListCell->ValueOffset[i]);
+ SrcValueCell = HvGetCell (&SrcHive->Hive,
SrcValueListCell->ValueOffset[i]);
NewValueCellSize = sizeof(CM_KEY_VALUE) + SrcValueCell->NameSize;
- ValueCellOffset = HvAllocateCell (DstHive->Hive, NewValueCellSize, HvStable);
+ ValueCellOffset = HvAllocateCell (&DstHive->Hive, NewValueCellSize, HvStable);
if (ValueCellOffset == HCELL_NULL)
{
DPRINT1 ("HvAllocateCell() failed (Status %lx)\n", Status);
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewValueCell = HvGetCell (DstHive->Hive, ValueCellOffset);
+ NewValueCell = HvGetCell (&DstHive->Hive, ValueCellOffset);
NewValueListCell->ValueOffset[i] = ValueCellOffset;
RtlCopyMemory (NewValueCell,
SrcValueCell,
@@ -2121,15 +2123,15 @@
/* Copy value data cell */
if (SrcValueCell->DataSize > (LONG) sizeof(PVOID))
{
- SrcValueDataCell = HvGetCell (SrcHive->Hive, SrcValueCell->DataOffset);
-
- ValueDataCellOffset = HvAllocateCell (DstHive->Hive, SrcValueCell->DataSize,
HvStable);
+ SrcValueDataCell = HvGetCell (&SrcHive->Hive,
SrcValueCell->DataOffset);
+
+ ValueDataCellOffset = HvAllocateCell (&DstHive->Hive,
SrcValueCell->DataSize, HvStable);
if (ValueDataCellOffset == HCELL_NULL)
{
DPRINT1 ("HvAllocateCell() failed\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewValueDataCell = HvGetCell (DstHive->Hive, ValueDataCellOffset);
+ NewValueDataCell = HvGetCell (&DstHive->Hive, ValueDataCellOffset);
RtlCopyMemory (NewValueDataCell,
SrcValueDataCell,
SrcValueCell->DataSize);
@@ -2148,23 +2150,23 @@
HCELL_INDEX NewSubKeyCellOffset;
PHASH_RECORD SrcHashRecord;
- SrcHashTableCell = HvGetCell (SrcHive->Hive,
SrcKeyCell->SubKeyLists[HvStable]);
+ SrcHashTableCell = HvGetCell (&SrcHive->Hive,
SrcKeyCell->SubKeyLists[HvStable]);
for (i = 0; i < SrcKeyCell->SubKeyCounts[HvStable]; i++)
{
SrcHashRecord = &SrcHashTableCell->Table[i];
- SrcSubKeyCell = HvGetCell (SrcHive->Hive, SrcHashRecord->KeyOffset);
+ SrcSubKeyCell = HvGetCell (&SrcHive->Hive, SrcHashRecord->KeyOffset);
/* Allocate and copy key cell */
NewSubKeyCellSize = sizeof(CM_KEY_NODE) + SrcSubKeyCell->NameSize;
- NewSubKeyCellOffset = HvAllocateCell (DstHive->Hive, NewSubKeyCellSize, HvStable);
+ NewSubKeyCellOffset = HvAllocateCell (&DstHive->Hive, NewSubKeyCellSize,
HvStable);
if (NewSubKeyCellOffset == HCELL_NULL)
{
DPRINT1 ("Failed to allocate a sub key cell\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewSubKeyCell = HvGetCell (DstHive->Hive, NewSubKeyCellOffset);
+ NewSubKeyCell = HvGetCell (&DstHive->Hive, NewSubKeyCellOffset);
NewHashTableCell->Table[i].KeyOffset = NewSubKeyCellOffset;
NewHashTableCell->Table[i].HashValue = SrcHashRecord->HashValue;
@@ -2179,11 +2181,11 @@
PVOID NewClassNameCell;
HCELL_INDEX NewClassNameOffset;
- SrcClassNameCell = HvGetCell (SrcHive->Hive,
+ SrcClassNameCell = HvGetCell (&SrcHive->Hive,
SrcSubKeyCell->ClassNameOffset);
NewSubKeyCell->ClassSize = SrcSubKeyCell->ClassSize;
- NewClassNameOffset = HvAllocateCell (DstHive->Hive,
+ NewClassNameOffset = HvAllocateCell (&DstHive->Hive,
NewSubKeyCell->ClassSize,
HvStable);
if (NewClassNameOffset == HCELL_NULL)
@@ -2192,7 +2194,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewClassNameCell = HvGetCell (DstHive->Hive, NewClassNameOffset);
+ NewClassNameCell = HvGetCell (&DstHive->Hive, NewClassNameOffset);
NewSubKeyCell->ClassNameOffset = NewClassNameOffset;
RtlCopyMemory (NewClassNameCell,
SrcClassNameCell,
@@ -2221,7 +2223,7 @@
HANDLE FileHandle)
{
Hive->HiveHandle = FileHandle;
- return HvWriteHive(Hive->Hive) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
+ return HvWriteHive(&Hive->Hive) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
}
/* EOF */
Modified: trunk/reactos/ntoskrnl/cm/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/registry.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/registry.c (original)
+++ trunk/reactos/ntoskrnl/cm/registry.c Mon Aug 14 18:16:00 2006
@@ -251,8 +251,8 @@
&RootKeyHandle);
ASSERT(NT_SUCCESS(Status));
RootKey->RegistryHive = CmiVolatileHive;
- RootKey->KeyCellOffset = CmiVolatileHive->Hive->HiveHeader->RootCell;
- RootKey->KeyCell = HvGetCell (CmiVolatileHive->Hive, RootKey->KeyCellOffset);
+ RootKey->KeyCellOffset = CmiVolatileHive->Hive.HiveHeader->RootCell;
+ RootKey->KeyCell = HvGetCell (&CmiVolatileHive->Hive,
RootKey->KeyCellOffset);
RootKey->ParentKey = RootKey;
RootKey->Flags = 0;
RootKey->SubKeyCounts = 0;
@@ -630,8 +630,8 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- NewKey->KeyCellOffset = RegistryHive->Hive->HiveHeader->RootCell;
- NewKey->KeyCell = HvGetCell (RegistryHive->Hive, NewKey->KeyCellOffset);
+ NewKey->KeyCellOffset = RegistryHive->Hive.HiveHeader->RootCell;
+ NewKey->KeyCell = HvGetCell (&RegistryHive->Hive, NewKey->KeyCellOffset);
NewKey->RegistryHive = RegistryHive;
Status = RtlpCreateUnicodeString(&NewKey->Name,
Modified: trunk/reactos/ntoskrnl/cm/regobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/regobj.c (original)
+++ trunk/reactos/ntoskrnl/cm/regobj.c Mon Aug 14 18:16:00 2006
@@ -511,7 +511,7 @@
KeyObject);
KeQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime);
- HvMarkCellDirty (ParentKeyObject->RegistryHive->Hive,
+ HvMarkCellDirty (&ParentKeyObject->RegistryHive->Hive,
ParentKeyObject->KeyCellOffset);
if (!IsNoFileHive (KeyObject->RegistryHive) ||
@@ -925,7 +925,7 @@
if (ValueCell->DataSize > 0)
{
- DataCell = HvGetCell (RegistryHive->Hive, ValueCell->DataOffset);
+ DataCell = HvGetCell (&RegistryHive->Hive, ValueCell->DataOffset);
RtlCopyMemory(TargetPath->Buffer,
DataCell,
TargetPath->Length);