Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The get_Item method retrieves a policy from the collection.
Syntax
HRESULT get_Item(
VARIANT Index,
ICAPolicy** ppPolicy
);
Parameters
Index
[in] VARIANT that specifies the policy to retrieve. See Remarks for more information.
ppPolicy
[out] Pointer to a variable that receives an ICAPolicy interface pointer.
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 | Index out of range. |
REGDB_E_WRITEREGDB | The CLSID was not found in the registry. |
Remarks
The Index parameter supports the following VARIANT types:
ICAPolicies::get_Count() - 1
.{00000000-0000-0000-0000-000000000000}
. The method uses the CLSIDFromString function to convert the string. It returns the first object in the collection with a matching CLSID, as determined from the IPersist::GetClassID method.If the method returns S_OK, the ICAPolicy interface that it returns has an outstanding reference count. The caller must release the interface.
See Also