ZwFlushKey

NTSTATUS
ZwFlushKey(

IN HANDLE KeyHandle
);

ZwFlushKey forces a registry key to be committed to disk.

Parameters

KeyHandle

Is the handle, returned by a successful call to ZwCreateKey or ZwOpenKey, of the key to be flushed.

Return Value

ZwFlushKey returns STATUS_SUCCESS if the key information was transferred to disk.

Comments

Changes made by ZwCreateKey or ZwSetValueKey can be flushed to disk with ZwFlushKey. This routine does not return to its caller until any changed data associated with the given KeyHandle has been written to permanent store.

Note This routine can flush the entire registry. Accordingly, it can generate a great deal of I/O. Since the system automatically flushes key changes every few seconds, it is seldom necessary to call ZwFlushKey.

Callers of ZwFlushKey must be running at IRQL PASSIVE_LEVEL.

See Also

ZwCreateKey, ZwOpenKey, ZwSetValueKey