Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The get_ItemWithKey method retrieves an object from a collection by using the collection’s key metaproperty. A collection has a key metaproperty if it was retrieved by using IPrograms::get_ItemsByKey.
Syntax
HRESULT get_ItemWithKey(
VARIANT varIndex,
IProgram** ppprog
);
Parameters
varIndex
[in] Specifies a value for the key metaproperty of the collection. The key metaproperty was specified by the pproptype parameter in the call to get_ItemsByKey that returned this collection. The first object that has a matching value is retrieved.
ppprog
[out] Address of a variable to receive the IProgram interface pointer of the retrieved object.
Return Values
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The method succeeded. |
E_INVALIDARG | varIndex is not a valid key, or the collection does not have a key metaproperty. |
E_POINTER | Data cannot be read from or written to a supplied address. |
See Also