mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Replace NtQuerySystemTime by KeQuerySystemTime
- Nt->Zw svn path=/trunk/; revision=13307
This commit is contained in:
parent
0ce1bb564c
commit
4556d3a778
4 changed files with 30 additions and 31 deletions
|
@ -233,7 +233,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtCreateKey (&HardwareKey,
|
||||
Status = ZwCreateKey (&HardwareKey,
|
||||
KEY_ALL_ACCESS,
|
||||
&ObjectAttributes,
|
||||
0,
|
||||
|
@ -245,7 +245,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
NtClose (HardwareKey);
|
||||
ZwClose (HardwareKey);
|
||||
|
||||
/* Create '\Registry\Machine\HARDWARE\DESCRIPTION' key. */
|
||||
RtlInitUnicodeString(&KeyName,
|
||||
|
@ -255,7 +255,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtCreateKey (&HardwareKey,
|
||||
Status = ZwCreateKey (&HardwareKey,
|
||||
KEY_ALL_ACCESS,
|
||||
&ObjectAttributes,
|
||||
0,
|
||||
|
@ -267,7 +267,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
NtClose (HardwareKey);
|
||||
ZwClose (HardwareKey);
|
||||
|
||||
/* Create '\Registry\Machine\HARDWARE\DEVICEMAP' key. */
|
||||
RtlInitUnicodeString (&KeyName,
|
||||
|
@ -277,7 +277,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtCreateKey (&HardwareKey,
|
||||
Status = ZwCreateKey (&HardwareKey,
|
||||
KEY_ALL_ACCESS,
|
||||
&ObjectAttributes,
|
||||
0,
|
||||
|
@ -289,7 +289,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
NtClose (HardwareKey);
|
||||
ZwClose (HardwareKey);
|
||||
|
||||
/* Create '\Registry\Machine\HARDWARE\RESOURCEMAP' key. */
|
||||
RtlInitUnicodeString(&KeyName,
|
||||
|
@ -299,7 +299,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtCreateKey (&HardwareKey,
|
||||
Status = ZwCreateKey (&HardwareKey,
|
||||
KEY_ALL_ACCESS,
|
||||
&ObjectAttributes,
|
||||
0,
|
||||
|
@ -311,7 +311,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
|
|||
DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
NtClose (HardwareKey);
|
||||
ZwClose (HardwareKey);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -31,17 +31,16 @@ static BOOLEAN CmiRegistryInitialized = FALSE;
|
|||
NTSTATUS STDCALL
|
||||
CmRegisterCallback(IN PEX_CALLBACK_FUNCTION Function,
|
||||
IN PVOID Context,
|
||||
IN OUT PLARGE_INTEGER Cookie
|
||||
)
|
||||
IN OUT PLARGE_INTEGER Cookie)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
||||
NTSTATUS STDCALL
|
||||
CmUnRegisterCallback(IN LARGE_INTEGER Cookie)
|
||||
{
|
||||
|
@ -1640,7 +1639,7 @@ NtSetValueKey(IN HANDLE KeyHandle,
|
|||
KeyCell->Flags |= REG_KEY_LINK_CELL;
|
||||
}
|
||||
|
||||
ZwQuerySystemTime (&KeyCell->LastWriteTime);
|
||||
KeQuerySystemTime (&KeyCell->LastWriteTime);
|
||||
CmiMarkBlockDirty (RegistryHive, KeyObject->KeyCellOffset);
|
||||
|
||||
ExReleaseResourceLite(&CmiRegistryLock);
|
||||
|
@ -1685,7 +1684,7 @@ NtDeleteValueKey (IN HANDLE KeyHandle,
|
|||
KeyObject->KeyCellOffset,
|
||||
ValueName);
|
||||
|
||||
ZwQuerySystemTime (&KeyObject->KeyCell->LastWriteTime);
|
||||
KeQuerySystemTime (&KeyObject->KeyCell->LastWriteTime);
|
||||
CmiMarkBlockDirty (KeyObject->RegistryHive, KeyObject->KeyCellOffset);
|
||||
|
||||
/* Release hive lock */
|
||||
|
@ -1749,7 +1748,7 @@ NtLoadKey2 (IN POBJECT_ATTRIBUTES KeyObjectAttributes,
|
|||
if (Buffer == NULL)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
Status = NtQueryObject (FileObjectAttributes->RootDirectory,
|
||||
Status = ZwQueryObject (FileObjectAttributes->RootDirectory,
|
||||
ObjectNameInformation,
|
||||
Buffer,
|
||||
BufferSize,
|
||||
|
|
|
@ -71,7 +71,7 @@ CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell)
|
|||
RootKeyCell->CellSize = -sizeof(KEY_CELL);
|
||||
RootKeyCell->Id = REG_KEY_CELL_ID;
|
||||
RootKeyCell->Flags = REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED;
|
||||
ZwQuerySystemTime(&RootKeyCell->LastWriteTime);
|
||||
KeQuerySystemTime(&RootKeyCell->LastWriteTime);
|
||||
RootKeyCell->ParentKeyOffset = 0;
|
||||
RootKeyCell->NumberOfSubKeys = 0;
|
||||
RootKeyCell->HashTableOffset = -1;
|
||||
|
@ -1939,7 +1939,7 @@ CmiFlushRegistryHive(PREGISTRY_HIVE RegistryHive)
|
|||
&RegistryHive->LogFileName);
|
||||
|
||||
/* Update hive header modification time */
|
||||
ZwQuerySystemTime(&RegistryHive->HiveHeader->DateModified);
|
||||
KeQuerySystemTime(&RegistryHive->HiveHeader->DateModified);
|
||||
|
||||
/* Start log update */
|
||||
Status = CmiStartLogUpdate(RegistryHive);
|
||||
|
@ -2436,7 +2436,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive,
|
|||
{
|
||||
NewKeyCell->Id = REG_KEY_CELL_ID;
|
||||
NewKeyCell->Flags = 0;
|
||||
ZwQuerySystemTime(&NewKeyCell->LastWriteTime);
|
||||
KeQuerySystemTime(&NewKeyCell->LastWriteTime);
|
||||
NewKeyCell->ParentKeyOffset = -1;
|
||||
NewKeyCell->NumberOfSubKeys = 0;
|
||||
NewKeyCell->HashTableOffset = -1;
|
||||
|
@ -2552,7 +2552,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive,
|
|||
ParentKeyCell->NumberOfSubKeys++;
|
||||
}
|
||||
|
||||
ZwQuerySystemTime (&ParentKeyCell->LastWriteTime);
|
||||
KeQuerySystemTime (&ParentKeyCell->LastWriteTime);
|
||||
CmiMarkBlockDirty (RegistryHive, ParentKey->KeyCellOffset);
|
||||
|
||||
return(Status);
|
||||
|
@ -2710,7 +2710,7 @@ CmiRemoveSubKey(PREGISTRY_HIVE RegistryHive,
|
|||
}
|
||||
}
|
||||
|
||||
ZwQuerySystemTime(&ParentKey->KeyCell->LastWriteTime);
|
||||
KeQuerySystemTime(&ParentKey->KeyCell->LastWriteTime);
|
||||
CmiMarkBlockDirty(ParentKey->RegistryHive,
|
||||
ParentKey->KeyCellOffset);
|
||||
}
|
||||
|
@ -3210,7 +3210,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive,
|
|||
|
||||
/* Update time of heap */
|
||||
if (!IsNoFileHive(RegistryHive))
|
||||
ZwQuerySystemTime(&Bin->DateModified);
|
||||
KeQuerySystemTime(&Bin->DateModified);
|
||||
}
|
||||
|
||||
/* Destroy the value cell */
|
||||
|
@ -3219,7 +3219,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive,
|
|||
/* Update time of heap */
|
||||
if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, ValueCellOffset, &Bin))
|
||||
{
|
||||
ZwQuerySystemTime(&Bin->DateModified);
|
||||
KeQuerySystemTime(&Bin->DateModified);
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
@ -3254,7 +3254,7 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive,
|
|||
RegistryHive->FileSize += BinSize;
|
||||
tmpBin->BinSize = BinSize;
|
||||
tmpBin->Unused1 = 0;
|
||||
ZwQuerySystemTime(&tmpBin->DateModified);
|
||||
KeQuerySystemTime(&tmpBin->DateModified);
|
||||
tmpBin->Unused2 = 0;
|
||||
|
||||
DPRINT (" BinOffset %lx BinSize %lx\n", tmpBin->BinOffset,tmpBin->BinSize);
|
||||
|
@ -3382,7 +3382,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive,
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
ZwQuerySystemTime(&Bin->DateModified);
|
||||
KeQuerySystemTime(&Bin->DateModified);
|
||||
CmiMarkBlockDirty(RegistryHive, RegistryHive->FreeListOffset[i]);
|
||||
|
||||
if ((i + 1) < RegistryHive->FreeListSize)
|
||||
|
@ -3471,7 +3471,7 @@ CmiDestroyCell (PREGISTRY_HIVE RegistryHive,
|
|||
|
||||
/* Update time of heap */
|
||||
if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, CellOffset,&pBin))
|
||||
ZwQuerySystemTime(&pBin->DateModified);
|
||||
KeQuerySystemTime(&pBin->DateModified);
|
||||
|
||||
CmiMarkBlockDirty(RegistryHive, CellOffset);
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ CmiObjectDelete(PVOID DeletedObject)
|
|||
ParentKeyObject,
|
||||
KeyObject);
|
||||
|
||||
NtQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime);
|
||||
KeQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime);
|
||||
CmiMarkBlockDirty (ParentKeyObject->RegistryHive,
|
||||
ParentKeyObject->KeyCellOffset);
|
||||
|
||||
|
|
Loading…
Reference in a new issue