Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The Add method adds a policy to the collection.
Syntax
HRESULT Add(
ICAPolicy* pPolicy
);
Parameters
pPolicy
[in] Pointer to the ICAPolicy interface of the policy.
Return Values
Returns an HRESULT value. Possible values include the following.
Return code | Description |
S_FALSE | This policy is already in the collection. |
S_OK | Success. |
Remarks
If the policy is already in the collection, this method returns S_FALSE without adding a duplicate policy.
Once a policy is added, it cannot be removed unless its ICAPolicy::get_OkToRemove method returns the value TRUE.
Adding a policy triggers an _ICAPoliciesEvents::ItemAdded event.
If the policy supports one of the three persistence interfaces (IPersistStream, IPersistStorage, or IPersistPropertyBag), and its ICAPolicy::get_OkToPersist method returns TRUE, the Conditional Access (CA) Manager will include the policy in its list of persistent policies. The ICAManagerInternal::Save method saves all persistent policies.
See Also