3.1.4.2.34 ApiDeleteValue (Opnum 33)

(Protocol Version 3) In response to the ApiDeleteValue request from the client, for a successful operation, the server MUST delete the named value from the cluster registry key that is specified by the hKey parameter in the client request.

The server MUST accept an ApiDeleteValue request only if its protocol server state is read/write, as specified in section 3.1.1.

The server MUST require that the client have a security access level of "All" (section 3.1.4).

 error_status_t ApiDeleteValue(
   [in] HKEY_RPC hKey,
   [in, string] LPCWSTR lpValueName,
   [out] error_status_t *rpc_status
 );

hKey: The HKEY_RPC context handle for a key that was previously obtained by a call to ApiGetRootKey, ApiCreateKey, or ApiOpenKey.

lpValueName: The name of the value, as specified in [MS-RRP], to delete. If the value name is NULL or an empty string, the server MUST delete the data in the default value of the specified key, as specified in section 3.1.1.2.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for  comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: The method returns 0x00000000 (ERROR_SUCCESS) to indicate success.

For any other condition, the server MUST return a value that is not 0x00000000. The client MUST behave in one consistent, identical manner for all values that are not 0x00000000, except as specified in section 3.2.4.6.