Export (0) Print
Expand All
Information
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.

RegFlushKey

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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


LONG RegFlushKey( 
  HKEY hKey 
);

hKey

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

  • HKEY_CLASSES_ROOT
  • HKEY_CURRENT_USER
  • HKEY_LOCAL_MACHINE
  • HKEY_USERS

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.

Headerwinreg.h
Librarycoredll.lib
Windows Embedded CEWindows CE 2.10 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft