3.1.5.12 BaseRegFlushKey (Opnum 11)

The BaseRegFlushKey method is called by the client. In response, the server writes all of the subkeys and values of the key indicated by the hKey parameter to the backing store for registry data.

 error_status_t BaseRegFlushKey(
   [in] RPC_HKEY hKey
 );

hKey: A handle to a key that MUST have been opened previously by using one of the open methods that are specified in section 3.1.5: OpenClassesRoot, OpenCurrentUser, OpenLocalMachine, OpenPerformanceData, OpenUsers, BaseRegCreateKey, BaseRegOpenKey, OpenCurrentConfig, OpenPerformanceText, OpenPerformanceNlsText.

Return Values: The method returns 0 (ERROR_SUCCESS) to indicate success; otherwise, it returns a nonzero error code, as specified in [MS-ERREF] section 2.2.

Return value/code

Description

0x00000005

ERROR_ACCESS_DENIED

The caller does not have KEY_QUERY_VALUE access rights.

Server Operations

In response to this request from the client, the server MUST identify all the subkeys and values of the key specified by the hKey parameter that have the KEYISMODIFIED property set to TRUE, and write them to the backing store for that key.

If the server encounters an error while writing data to the backing store, the server MUST fail the method and return ERROR_REGISTRY_IO_FAILED.

The caller MUST have KEY_QUERY_VALUE access rights to invoke this method. For more information, see section 2.2.4.

The server MUST return 0 to indicate success, or an appropriate error code (as specified in [MS-ERREF]) to indicate an error.

If the caller does not have access, the server MUST return ERROR_ACCESS_DENIED.