NtFreezeRegistry

Go to Home Page

Pauses registry data flushes for the specified period.

Syntax

NTSTATUS NTAPI NtFreezeRegistry (
    ULONG timeout
)

Parameters

timeout
Length of time, in seconds, to pause registry flushes. If set to 0, a default of 60 is used.

Return Value

STATUS_SUCCESS on success, STATUS_INVALID_PARAMETER if 'timeout' is larger than 900, STATUS_TOO_LATE if the registry is already frozen, STATUS_PRIVILEGE_NOT_HELD if the caller doesn't have SeRestorePrivilege enabled, and other standard error codes.

Remarks

The function uses a timer to automaticaly unblock the flushes, there's no need to manually call NtThawRegistry, unless you want to end the pause during the timeout period.

Unlike many other kernel functions, the timeout is indeed in whole seconds rather than milli- or 100 nano- intervals