mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
- Replace KEY_OBJECT by real CM_KEY_BODY NT type.
svn path=/trunk/; revision=31052
This commit is contained in:
parent
847f27f307
commit
ce97b6aeaa
|
@ -44,7 +44,7 @@ NtCreateKey(OUT PHANDLE KeyHandle,
|
|||
{
|
||||
UNICODE_STRING RemainingPath = {0}, ReturnedPath = {0};
|
||||
ULONG LocalDisposition;
|
||||
PKEY_OBJECT KeyObject, Parent;
|
||||
PCM_KEY_BODY KeyObject, Parent;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
UNICODE_STRING ObjectName;
|
||||
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
|
||||
|
@ -173,7 +173,7 @@ NtCreateKey(OUT PHANDLE KeyHandle,
|
|||
KeyObject->KeyControlBlock->ValueCache.Count = Node->ValueList.Count;
|
||||
|
||||
/* Link child to parent */
|
||||
InsertTailList(&Parent->KeyControlBlock->KeyBodyListHead, &KeyObject->KeyBodyEntry);
|
||||
InsertTailList(&Parent->KeyControlBlock->KeyBodyListHead, &KeyObject->KeyBodyList);
|
||||
|
||||
/* Create the actual handle to the object */
|
||||
Status = CmpCreateHandle(KeyObject,
|
||||
|
@ -217,7 +217,7 @@ NtOpenKey(OUT PHANDLE KeyHandle,
|
|||
{
|
||||
UNICODE_STRING RemainingPath = {0};
|
||||
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
|
||||
PKEY_OBJECT Object = NULL;
|
||||
PCM_KEY_BODY Object = NULL;
|
||||
HANDLE hKey = NULL;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
UNICODE_STRING ObjectName;
|
||||
|
|
|
@ -441,9 +441,9 @@ NTSTATUS
|
|||
CmiScanKeyList(PCM_KEY_CONTROL_BLOCK Parent,
|
||||
PCUNICODE_STRING KeyName,
|
||||
ULONG Attributes,
|
||||
PKEY_OBJECT* ReturnedObject)
|
||||
PCM_KEY_BODY* ReturnedObject)
|
||||
{
|
||||
PKEY_OBJECT CurKey = NULL;
|
||||
PCM_KEY_BODY CurKey = NULL;
|
||||
PCM_NAME_CONTROL_BLOCK Ncb;
|
||||
PLIST_ENTRY NextEntry;
|
||||
PWCHAR p, pp;
|
||||
|
@ -455,7 +455,7 @@ CmiScanKeyList(PCM_KEY_CONTROL_BLOCK Parent,
|
|||
while (NextEntry != &Parent->KeyBodyListHead)
|
||||
{
|
||||
/* Get the current ReactOS Key Object */
|
||||
CurKey = CONTAINING_RECORD(NextEntry, KEY_OBJECT, KeyBodyEntry);
|
||||
CurKey = CONTAINING_RECORD(NextEntry, CM_KEY_BODY, KeyBodyList);
|
||||
|
||||
/* Get the NCB */
|
||||
Ncb = CurKey->KeyControlBlock->NameBlock;
|
||||
|
@ -542,8 +542,8 @@ CmpParseKey(IN PVOID ParsedObject,
|
|||
OUT PVOID *NextObject)
|
||||
{
|
||||
HCELL_INDEX BlockOffset;
|
||||
PKEY_OBJECT FoundObject;
|
||||
PKEY_OBJECT ParsedKey;
|
||||
PCM_KEY_BODY FoundObject;
|
||||
PCM_KEY_BODY ParsedKey;
|
||||
PCM_KEY_NODE SubKeyCell;
|
||||
NTSTATUS Status;
|
||||
PWSTR StartPtr;
|
||||
|
@ -574,8 +574,6 @@ CmpParseKey(IN PVOID ParsedObject,
|
|||
|
||||
ParsedKey = ParsedObject;
|
||||
|
||||
VERIFY_KEY_OBJECT(ParsedKey);
|
||||
|
||||
*NextObject = NULL;
|
||||
|
||||
if ((*Path) == NULL)
|
||||
|
@ -698,7 +696,7 @@ CmpParseKey(IN PVOID ParsedObject,
|
|||
NULL,
|
||||
KernelMode,
|
||||
NULL,
|
||||
sizeof(KEY_OBJECT),
|
||||
sizeof(CM_KEY_BODY),
|
||||
0,
|
||||
0,
|
||||
(PVOID*)&FoundObject);
|
||||
|
@ -744,7 +742,7 @@ CmpParseKey(IN PVOID ParsedObject,
|
|||
|
||||
FoundObject->KeyControlBlock = Kcb;
|
||||
ASSERT(FoundObject->KeyControlBlock->KeyHive == ParsedKey->KeyControlBlock->KeyHive);
|
||||
InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead, &FoundObject->KeyBodyEntry);
|
||||
InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead, &FoundObject->KeyBodyList);
|
||||
DPRINT("Created object 0x%p\n", FoundObject);
|
||||
}
|
||||
else
|
||||
|
@ -809,7 +807,6 @@ CmpParseKey(IN PVOID ParsedObject,
|
|||
|
||||
*Path = EndPtr;
|
||||
|
||||
VERIFY_KEY_OBJECT(FoundObject);
|
||||
|
||||
*NextObject = FoundObject;
|
||||
|
||||
|
@ -822,14 +819,14 @@ VOID
|
|||
NTAPI
|
||||
CmpDeleteKeyObject(PVOID DeletedObject)
|
||||
{
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_KEY_HANDLE_CLOSE_INFORMATION KeyHandleCloseInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("Delete key object (%p)\n", DeletedObject);
|
||||
|
||||
KeyObject = (PKEY_OBJECT) DeletedObject;
|
||||
KeyObject = (PCM_KEY_BODY) DeletedObject;
|
||||
|
||||
|
||||
PostOperationInfo.Object = (PVOID)KeyObject;
|
||||
|
|
|
@ -179,8 +179,7 @@ typedef struct _CACHED_CHILD_LIST
|
|||
union
|
||||
{
|
||||
ULONG ValueList;
|
||||
//struct _CM_KEY_CONTROL_BLOCK *RealKcb;
|
||||
struct _KEY_OBJECT *RealKcb;
|
||||
struct _CM_KEY_CONTROL_BLOCK *RealKcb;
|
||||
};
|
||||
} CACHED_CHILD_LIST, *PCACHED_CHILD_LIST;
|
||||
|
||||
|
@ -490,11 +489,6 @@ typedef struct _KEY_INFORMATION
|
|||
//
|
||||
// BUGBUG Old Hive Stuff for Temporary Support
|
||||
//
|
||||
typedef struct _KEY_OBJECT
|
||||
{
|
||||
PCM_KEY_CONTROL_BLOCK KeyControlBlock;
|
||||
LIST_ENTRY KeyBodyEntry;
|
||||
} KEY_OBJECT, *PKEY_OBJECT;
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CmFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
|
||||
|
@ -884,13 +878,6 @@ EnlistKeyBodyWithKCB(
|
|||
IN ULONG Flags
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
EnlistKeyBodyWithKeyObject(
|
||||
IN PKEY_OBJECT KeyObject,
|
||||
IN ULONG Flags
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CmpFreeKeyByCell(
|
||||
|
@ -1364,7 +1351,7 @@ CmLoadKey(
|
|||
IN POBJECT_ATTRIBUTES TargetKey,
|
||||
IN POBJECT_ATTRIBUTES SourceFile,
|
||||
IN ULONG Flags,
|
||||
IN PKEY_OBJECT KeyBody
|
||||
IN PCM_KEY_BODY KeyBody
|
||||
);
|
||||
|
||||
//
|
||||
|
|
|
@ -1170,7 +1170,7 @@ NTAPI
|
|||
CmLoadKey(IN POBJECT_ATTRIBUTES TargetKey,
|
||||
IN POBJECT_ATTRIBUTES SourceFile,
|
||||
IN ULONG Flags,
|
||||
IN PKEY_OBJECT KeyBody)
|
||||
IN PCM_KEY_BODY KeyBody)
|
||||
{
|
||||
SECURITY_QUALITY_OF_SERVICE ServiceQos;
|
||||
SECURITY_CLIENT_CONTEXT ClientSecurityContext;
|
||||
|
|
|
@ -89,7 +89,7 @@ CmpDoCreateChild(IN PHHIVE Hive,
|
|||
OUT PVOID *Object)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PKEY_OBJECT KeyBody;
|
||||
PCM_KEY_BODY KeyBody;
|
||||
HCELL_INDEX ClassCell = HCELL_NIL;
|
||||
PCM_KEY_NODE KeyNode;
|
||||
PCELL_DATA CellData;
|
||||
|
@ -160,12 +160,12 @@ CmpDoCreateChild(IN PHHIVE Hive,
|
|||
NULL,
|
||||
AccessMode,
|
||||
NULL,
|
||||
sizeof(KEY_OBJECT),
|
||||
sizeof(CM_KEY_BODY),
|
||||
0,
|
||||
0,
|
||||
Object);
|
||||
if (!NT_SUCCESS(Status)) goto Quickie;
|
||||
KeyBody = (PKEY_OBJECT)(*Object);
|
||||
KeyBody = (PCM_KEY_BODY)(*Object);
|
||||
|
||||
/* Check if we had a class */
|
||||
if (ParseContext->Class.Length > 0)
|
||||
|
@ -271,7 +271,7 @@ CmpDoCreate(IN PHHIVE Hive,
|
|||
PCELL_DATA CellData;
|
||||
HCELL_INDEX KeyCell;
|
||||
ULONG ParentType;
|
||||
PKEY_OBJECT KeyBody;
|
||||
PCM_KEY_BODY KeyBody;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
||||
LARGE_INTEGER TimeStamp;
|
||||
PCM_KEY_NODE KeyNode;
|
||||
|
@ -354,7 +354,7 @@ CmpDoCreate(IN PHHIVE Hive,
|
|||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Get the key body */
|
||||
KeyBody = (PKEY_OBJECT)(*Object);
|
||||
KeyBody = (PCM_KEY_BODY)(*Object);
|
||||
|
||||
/* Now add the subkey */
|
||||
if (!CmpAddSubKey(Hive, Cell, KeyCell))
|
||||
|
@ -436,7 +436,7 @@ CmpDoOpen(IN PHHIVE Hive,
|
|||
OUT PVOID *Object)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyBody = NULL;
|
||||
PCM_KEY_BODY KeyBody = NULL;
|
||||
PCM_KEY_CONTROL_BLOCK Kcb = NULL;
|
||||
|
||||
/* Make sure the hive isn't locked */
|
||||
|
@ -475,14 +475,14 @@ CmpDoOpen(IN PHHIVE Hive,
|
|||
NULL,
|
||||
AccessMode,
|
||||
NULL,
|
||||
sizeof(KEY_OBJECT),
|
||||
sizeof(CM_KEY_BODY),
|
||||
0,
|
||||
0,
|
||||
Object);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Get the key body and fill it out */
|
||||
KeyBody = (PKEY_OBJECT)(*Object);
|
||||
KeyBody = (PCM_KEY_BODY)(*Object);
|
||||
KeyBody->KeyControlBlock = Kcb;
|
||||
}
|
||||
else
|
||||
|
@ -510,7 +510,7 @@ CmpCreateLinkNode(IN PHHIVE Hive,
|
|||
{
|
||||
NTSTATUS Status;
|
||||
HCELL_INDEX KeyCell, LinkCell, ChildCell;
|
||||
PKEY_OBJECT KeyBody;
|
||||
PCM_KEY_BODY KeyBody;
|
||||
LARGE_INTEGER TimeStamp;
|
||||
PCM_KEY_NODE KeyNode;
|
||||
PCM_KEY_CONTROL_BLOCK Kcb = ParentKcb;
|
||||
|
@ -693,7 +693,7 @@ CmpCreateLinkNode(IN PHHIVE Hive,
|
|||
}
|
||||
|
||||
/* Get the key body */
|
||||
KeyBody = (PKEY_OBJECT)*Object;
|
||||
KeyBody = (PCM_KEY_BODY)*Object;
|
||||
|
||||
/* Sanity checks */
|
||||
ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyCell == Cell);
|
||||
|
@ -849,7 +849,7 @@ CmpParseKey2(IN PVOID ParseObject,
|
|||
}
|
||||
|
||||
/* Grab the KCB */
|
||||
Kcb = ((PKEY_OBJECT)ParseObject)->KeyControlBlock;
|
||||
Kcb = ((PCM_KEY_BODY)ParseObject)->KeyControlBlock;
|
||||
DPRINT1("KCB Parse: %p\n", Kcb);
|
||||
|
||||
/* Lookup in the cache */
|
||||
|
|
|
@ -492,8 +492,8 @@ CmpLinkHiveToMaster(IN PUNICODE_STRING LinkName,
|
|||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING RemainingPath;
|
||||
PKEY_OBJECT ParentKey;
|
||||
PKEY_OBJECT NewKey;
|
||||
PCM_KEY_BODY ParentKey;
|
||||
PCM_KEY_BODY NewKey;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING ObjectName;
|
||||
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
|
||||
|
@ -609,7 +609,7 @@ CmpLinkHiveToMaster(IN PUNICODE_STRING LinkName,
|
|||
ObReferenceObject(NewKey);
|
||||
|
||||
/* Link this key to the parent */
|
||||
InsertTailList(&ParentKey->KeyControlBlock->KeyBodyListHead, &NewKey->KeyBodyEntry);
|
||||
InsertTailList(&ParentKey->KeyControlBlock->KeyBodyListHead, &NewKey->KeyBodyList);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -840,11 +840,7 @@ CmpCreateRegistryRoot(VOID)
|
|||
{
|
||||
UNICODE_STRING KeyName;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
#if 0
|
||||
PCM_KEY_BODY RootKey;
|
||||
#else
|
||||
PKEY_OBJECT RootKey;
|
||||
#endif
|
||||
HCELL_INDEX RootIndex;
|
||||
NTSTATUS Status;
|
||||
PCM_KEY_NODE KeyCell;
|
||||
|
@ -872,7 +868,7 @@ CmpCreateRegistryRoot(VOID)
|
|||
&ObjectAttributes,
|
||||
KernelMode,
|
||||
NULL,
|
||||
sizeof(KEY_OBJECT),
|
||||
sizeof(CM_KEY_BODY),
|
||||
0,
|
||||
0,
|
||||
(PVOID*)&RootKey);
|
||||
|
@ -896,11 +892,9 @@ CmpCreateRegistryRoot(VOID)
|
|||
|
||||
/* Initialize the object */
|
||||
RootKey->KeyControlBlock = Kcb;
|
||||
#if 0
|
||||
RootKey->Type = TAG('k', 'v', '0', '2');
|
||||
RootKey->NotifyBlock = NULL;
|
||||
RootKey->ProcessID = PsGetCurrentProcessId();
|
||||
#endif
|
||||
|
||||
/* Insert the key into the namespace */
|
||||
Status = ObInsertObject(RootKey,
|
||||
|
|
|
@ -22,7 +22,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
NtDeleteKey(IN HANDLE KeyHandle)
|
||||
{
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
NTSTATUS Status;
|
||||
REG_DELETE_KEY_INFORMATION DeleteKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
|
@ -81,7 +81,7 @@ NtEnumerateKey(IN HANDLE KeyHandle,
|
|||
OUT PULONG ResultLength)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
PAGED_CODE();
|
||||
|
@ -142,7 +142,7 @@ NtEnumerateValueKey(IN HANDLE KeyHandle,
|
|||
OUT PULONG ResultLength)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
PAGED_CODE();
|
||||
|
@ -203,7 +203,7 @@ NtQueryKey(IN HANDLE KeyHandle,
|
|||
OUT PULONG ResultLength)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_QUERY_KEY_INFORMATION QueryKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
PAGED_CODE();
|
||||
|
@ -265,7 +265,7 @@ NtQueryValueKey(IN HANDLE KeyHandle,
|
|||
OUT PULONG ResultLength)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_QUERY_VALUE_KEY_INFORMATION QueryValueKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
PAGED_CODE();
|
||||
|
@ -328,7 +328,7 @@ NtSetValueKey(IN HANDLE KeyHandle,
|
|||
IN ULONG DataSize)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
REG_SET_VALUE_KEY_INFORMATION SetValueKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
PAGED_CODE();
|
||||
|
@ -385,7 +385,7 @@ NTAPI
|
|||
NtDeleteValueKey(IN HANDLE KeyHandle,
|
||||
IN PUNICODE_STRING ValueName)
|
||||
{
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
NTSTATUS Status;
|
||||
REG_DELETE_VALUE_KEY_INFORMATION DeleteValueKeyInfo;
|
||||
REG_POST_OPERATION_INFORMATION PostOperationInfo;
|
||||
|
@ -433,7 +433,7 @@ NTAPI
|
|||
NtFlushKey(IN HANDLE KeyHandle)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PKEY_OBJECT KeyObject;
|
||||
PCM_KEY_BODY KeyObject;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the key object */
|
||||
|
@ -513,7 +513,7 @@ NtLoadKeyEx(IN POBJECT_ATTRIBUTES TargetKey,
|
|||
{
|
||||
NTSTATUS Status;
|
||||
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
|
||||
PKEY_OBJECT KeyBody = NULL;
|
||||
PCM_KEY_BODY KeyBody = NULL;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Validate flags */
|
||||
|
|
Loading…
Reference in a new issue