3.2.4.7.4 DeletePolicy (Opnum 10)

The DeletePolicy method deletes an existing resource policy.

 [id(4), helpstring("method DeletePolicy")] HRESULT DeletePolicy(
   [in] BSTR bstrPolicyName

);

bstrPolicyName: The name of the resource policy to be deleted.

If this parameter is NULL, E_INVALIDARG MUST be returned.

Return Values: This method returns 0x00000000 for success or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0xC1FF006F

WRM_ERR_ID_VALUE

The specified name contains characters that are invalid. The name cannot start with a hyphen ("-"), cannot contain spaces, and cannot contain any of the following characters:

 \   / ? * | : < > " , ;

0xC1FF00CF

WRM_ERR_IS_CURRENT_POLICY

This resource allocation policy (RAP) is being used by WSRM and cannot be deleted.

0xC1FF00E0

WRM_ERR_WSRM_RESERVED_POLICY

The specified policy is a built-in policy. It cannot be altered.

0xC1FF00E7

WRM_ERR_DELETING_POLICY

The specified policy could not be deleted. A policy cannot be deleted if it is a member of one or more conditional policies.

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is invalid or cannot be processed. Windows returns this value if the XML data is corrupt.

0xC1FF00C9

WRM_ERR_POLICYID_INVALID

The specified RAP does not exist.

Additional IWRMPolicy interface methods are specified in section 3.2.4.7.