mirror of
https://github.com/reactos/reactos.git
synced 2025-06-28 22:29:43 +00:00
changes to implement registry tags
svn path=/trunk/; revision=191
This commit is contained in:
parent
1908a698e8
commit
a3232e28c6
1 changed files with 12 additions and 2 deletions
|
@ -38,7 +38,7 @@ CmInitializeRegistry(VOID)
|
||||||
CmKeyType->Open = NULL;
|
CmKeyType->Open = NULL;
|
||||||
CmKeyType->Close = NULL;
|
CmKeyType->Close = NULL;
|
||||||
CmKeyType->Delete = NULL;
|
CmKeyType->Delete = NULL;
|
||||||
CmKeyType->Parse = NULL;
|
CmKeyType->Parse = CmpObjectParse;
|
||||||
CmKeyType->Security = NULL;
|
CmKeyType->Security = NULL;
|
||||||
CmKeyType->QueryName = NULL;
|
CmKeyType->QueryName = NULL;
|
||||||
CmKeyType->OkayToClose = NULL;
|
CmKeyType->OkayToClose = NULL;
|
||||||
|
@ -138,10 +138,15 @@ ZwCreateKey(PHANDLE KeyHandle,
|
||||||
/* Walk through key path and fail if any component does not exist */
|
/* Walk through key path and fail if any component does not exist */
|
||||||
while ((T = wstrchr(S, '\\')) != NULL)
|
while ((T = wstrchr(S, '\\')) != NULL)
|
||||||
{
|
{
|
||||||
|
/* Move Key Object pointer to first child */
|
||||||
ParentKey = ParentKey->SubKeys;
|
ParentKey = ParentKey->SubKeys;
|
||||||
|
|
||||||
|
/* Extract the next path component from requested path */
|
||||||
wstrncpy(CurLevel, S, T-S);
|
wstrncpy(CurLevel, S, T-S);
|
||||||
CurLevel[T-S] = 0;
|
CurLevel[T-S] = 0;
|
||||||
DPRINT("CurLevel:[%w]", CurLevel);
|
DPRINT("CurLevel:[%w]", CurLevel);
|
||||||
|
|
||||||
|
/* Walk through children looking for path component */
|
||||||
while (ParentKey != NULL)
|
while (ParentKey != NULL)
|
||||||
{
|
{
|
||||||
if (wstrcmp(CurLevel, ParentKey->Name) == 0)
|
if (wstrcmp(CurLevel, ParentKey->Name) == 0)
|
||||||
|
@ -150,10 +155,14 @@ ZwCreateKey(PHANDLE KeyHandle,
|
||||||
}
|
}
|
||||||
ParentKey = ParentKey->NextKey;
|
ParentKey = ParentKey->NextKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fail if path component was not one of the children */
|
||||||
if (ParentKey == NULL)
|
if (ParentKey == NULL)
|
||||||
{
|
{
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Advance path string pointer to next component */
|
||||||
S = wstrchr(S, '\\') + 1;
|
S = wstrchr(S, '\\') + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +174,7 @@ ZwCreateKey(PHANDLE KeyHandle,
|
||||||
}
|
}
|
||||||
if (CurSubKey != NULL)
|
if (CurSubKey != NULL)
|
||||||
{
|
{
|
||||||
|
/* FIXME: Fail if key is marked for deletion */
|
||||||
*Disposition = REG_KEY_ALREADY_EXISTS;
|
*Disposition = REG_KEY_ALREADY_EXISTS;
|
||||||
*KeyHandle = ObInsertHandle(KeGetCurrentProcess(),
|
*KeyHandle = ObInsertHandle(KeGetCurrentProcess(),
|
||||||
HEADER_TO_BODY(CurSubKey),
|
HEADER_TO_BODY(CurSubKey),
|
||||||
|
@ -256,7 +266,7 @@ ZwCreateKey(PHANDLE KeyHandle,
|
||||||
{
|
{
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue