mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 20:11:58 +00:00
[SDK:CMLIB] HvGetCell is a macro calling the hive's GetCellRoutine callback.
In principle there should be different get-cell routines, depending on the type of the hive (given by the OperationType parameter of HvInitialize): for flat hives, memory-mapped hives, etc. For now in ReactOS we only support a restricted subset of these, therefore we are still happy with a single get-cell callback... This may change in the future.
This commit is contained in:
parent
a4cad7be6b
commit
8ccd435eb0
3 changed files with 24 additions and 17 deletions
|
@ -29,13 +29,13 @@ HvpGetCellHeader(
|
|||
ASSERT(CellBlock < RegistryHive->Storage[CellType].Length);
|
||||
Block = (PVOID)RegistryHive->Storage[CellType].BlockList[CellBlock].BlockAddress;
|
||||
ASSERT(Block != NULL);
|
||||
return (PVOID)((ULONG_PTR)Block + CellOffset);
|
||||
return (PHCELL)((ULONG_PTR)Block + CellOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(HvGetCellType(CellIndex) == Stable);
|
||||
return (PVOID)((ULONG_PTR)RegistryHive->BaseBlock + HBLOCK_SIZE +
|
||||
CellIndex);
|
||||
return (PHCELL)((ULONG_PTR)RegistryHive->BaseBlock + HBLOCK_SIZE +
|
||||
CellIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,13 +63,12 @@ HvIsCellAllocated(IN PHHIVE RegistryHive,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
PVOID CMAPI
|
||||
HvGetCell(
|
||||
PHHIVE RegistryHive,
|
||||
HCELL_INDEX CellIndex)
|
||||
PCELL_DATA CMAPI
|
||||
HvpGetCellData(
|
||||
_In_ PHHIVE Hive,
|
||||
_In_ HCELL_INDEX CellIndex)
|
||||
{
|
||||
ASSERT(CellIndex != HCELL_NIL);
|
||||
return (PVOID)(HvpGetCellHeader(RegistryHive, CellIndex) + 1);
|
||||
return (PCELL_DATA)(HvpGetCellHeader(Hive, CellIndex) + 1);
|
||||
}
|
||||
|
||||
static __inline LONG CMAPI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue