Microsoft DirectX 8.1 (C++)

IGuideDataProviders::get_ItemWithKey

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

The get_ItemWithKey method retrieves an object using the collection’s key metaproperty. A collection has a key metaproperty if it was retrieved by using IGuideDataProviders::get_ItemsByKey.

Syntax

HRESULT get_ItemWithKey(
  VARIANT  varIndex,
  IGuideDataProvider**  ppprovider
);

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.

ppprovider

[out]  Address of a variable to receive the IGuideDataProvider interface of the object retrieved.

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