Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

This function writes all the attributes of the specified open registry key into the registry.

LONG RegFlushKey( 
  HKEY hKey 


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


ERROR_SUCCESS indicates success. A nonzero error code indicates failure. To get a generic description of the error, call the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag set.

When this function is called, all previous changes to the registry are committed by flushing data to persistent storage. The implementation of this function is OEM-dependent. This function can also write out parts of or all of the other keys. Calling this function excessively can have a negative effect on application performance.

By default, Windows Embedded CE does not support a lazy flush of the registry, although the OEM can implement a lazy-flush or power-down flush. It is important that applications call this function to save important registry information. Call this function after a group of changes has been made, but not for every registry change.

An application should call this funciton only if it requires certainty that registry changes are saved. In general, this should rarely be used.

Windows Embedded CEWindows CE 2.10 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft