The ZwFlushKey routine forces a registry key to be committed to disk.
NTSYSAPI NTSTATUS ZwFlushKey( HANDLE KeyHandle );
ZwFlushKey returns STATUS_SUCCESS if the key information was transferred to disk, or the appropriate error code on failure.
You can flush changes made by ZwCreateKey or ZwSetValueKey by calling ZwFlushKey. This routine does not return until all the changed data that is associated with KeyHandle has been written to disk. ZwFlushKey flushes the entire registry hive for the key, which includes every subkey of the key specified.
|Minimum supported client||Available in Windows 2000 and later versions of Windows.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|DDI compliance rules||IrqlZwPassive, ZwRegistryCreate, ZwRegistryOpen, HwStorPortProhibitedDDIs, ZwRegistryCreate(storport), ZwRegistryOpen(storport)|