3.1.5.24 BaseRegGetVersion (Opnum 26)

The BaseRegGetVersion method is called by the client. In response, the server returns the version of the remote registry server. The BaseRegGetVersion method is used by the client and the server to determine if the remote registry server supports both 32-bit and 64-bit key namespaces.

 error_status_t BaseRegGetVersion(
   [in] RPC_HKEY hKey,
   [out] LPDWORD lpdwVersion
 );

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.

lpdwVersion: A buffer in which the registry version MUST be returned. The registry version is implementation-specific.<27>

Return Values: The method returns 0 (ERROR_SUCCESS) to indicate success; otherwise, it returns the following nonzero error code.

Return value/code

Description

0x000003E6

ERROR_NOACCESS

Invalid access to memory location.

0x00000013

ERROR_WRITE_PROTECT

A read or write operation was attempted to a volume after it was dismounted. The server can no longer service registry requests because server shutdown has been initiated.

Server Operations

If the parameter lpdwVersion is NULL, the server MUST return ERROR_NOACCESS.

If the registry server can no longer service registry requests because server shutdown has been initiated (SHUTDOWNINPROGRESS is set to TRUE), the server MUST return ERROR_WRITE_PROTECT.

In response to this request from the client, for a successful operation, the server MUST return the implementation-specific version of the format that is used to store the registry data in the backup copy, by using the buffer that is pointed to by the lpdwVersion parameter.

If the server returns 6, the server MUST support both 64-bit and 32-bit key namespaces as described in section 3.1.1.4.

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