INtime SDK Help
RegFlushKey (iwin32)
INtime SDK v7.1 > About INtime > Alternate APIs > iwin32 API > iwin32 API > RegFlushKey (iwin32)

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

Note:   Call this function only when necessary, as it uses many system resources and can have a negative effect on an application's performance.
LONG RegFlushKey(
    HKEY hKey
);

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

Remarks

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

You do not need to call RegFlushKey to change a key. Registry changes flush to disk by the registry using its lazy flusher. Registry changes also flush to disk at system shutdown.

Unlike RegCloseKey, this function returns only after all data is written to the registry.

RegFlushKey may also write out parts of or all of the other keys.

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure. For extended error information, see GetLastError

Requirements

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

Note

This function operates in the real-time portion of your application.

See Also

RegCloseKey, RegDeleteKey, iwin32 API, iwin32 Overview