Microsoft DirectX 8.1 (C++)

ICAPolicies::Remove

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The Remove method removes a policy from the collection.

Syntax

HRESULT Remove(
  VARIANT  Index
);

Parameters

  Index

[in]  VARIANT that specifies the policy to remove. See Remarks for more information.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
S_FALSE The item was not found.
S_OK Success.
CO_E_CLASSSTRING The string was not formatted correctly.
E_FAIL Caller is not authorized to remove the policy.
E_INVALIDARG Index out of range.
REGDB_E_WRITEREGDB The CLSID was not found in the registry.

Remarks

The Index parameter supports the following VARIANT types:

Before removing the denial, this method calls the policy’s ICAPolicy::get_OkToRemove method. If the policy returns FALSE, the Remove method returns E_FAIL.

If removing the policy is permitted, this method calls the policy’s ICAPolicy::put_CAManager method with the value NULL. At that time, the policy should release any resources it holds, such as interface pointers.

If the policy is persistent, the Conditional Access (CA) Manager calls the ICAManagerInternal::Save method to update the remaining set of persistent policies. For more information, see ICAPolicy::get_OkToPersist.

See Also