This function writes all the attributes of the specified open registry key into the registry.
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.