Microsoft DirectX 8.1 (C++)

IObjects::get_ItemWithKey

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

The get_ItemWithKey method retrieves an object from a collection that was obtained by using IObjects::get_ItemsByKey.

Syntax

HRESULT get_ItemWithKey(
  VARIANT  varIndex,
  IUnknown**  ppunk
);

Parameters

varIndex

[in]  Specifies a value for the metaproperty associated with the MetaPropertyType object shared by all objects in the collection. The first object that has a matching value is retrieved.

ppunk

[out]  Address of a variable to receive the IUnknown 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 a matching item was not found.
E_POINTER Data cannot be read from or written to a supplied address.

See Also