ApiCloseKey (Opnum 37)

(Protocol Version 2) In response to an ApiCloseKey request from the client, for a successful operation, the server MUST close the handle to the cluster registry key that is specified by the hKey parameter in the client request.

The server SHOULD accept an ApiCloseKey request if its protocol server state is read-only, and the server MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

 error_status_t ApiCloseKey(
   [in, out] HKEY_RPC *pKey

pKey: A pointer to an HKEY_RPC context handle for a key that was previously obtained by a call to ApiGetRootKey, ApiCreateKey, or ApiOpenKey. After successful completion of the method, the server MUST set hKey to NULL. After failure of the method, this parameter MUST be ignored.

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code







The data that is pointed to by the pKey parameter does not represent a valid HKEY_RPC context handle.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.