INtime SDK Help
RtRegFlushKey
INtime SDK v6 > About INtime > INtime Kernel > Registry access > RtRegFlushKey

Writes all the attributes of the specified open key into the registry.

Note:   Because RtRegFlushKey uses many system resources, it should be called only when necessary.

It is not necessary to call RtRegFlushKey to change a key. Registry changes are flushed to disk by the registry using its lazy flusher. Registry changes are also flushed to disk at system shutdown.

Unlike RtRegCloseKey, this call returns only after all the data is written to the registry.

RtRegFlushKey may also write out parts of or all of the other keys. Calling this call excessively can have a negative effect on an application's performance.

An application should call RtRegFlushKey only if it requires absolute certainty that registry changes are on disk. In general, RtRegFlushKey rarely, if ever, need be used.

LONG RtRegFlushKey(
    HKEY hKey   // handle to key to write
);

Parameters

hKey
Handle to a currently open key or one of the following predefined reserved handle values:

HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_PERFORMANCE_DATA

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Registry system calls, RtRegCloseKey, RtRegDeleteKey