Microsoft DirectX 8.1 (C++)

IGuideDataProviders::get_ItemsWithMetaPropertyCond

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

The get_ItemsWithMetaPropertyCond method retrieves a GuideDataProviders object whose collection of GuideDataProvider objects is a subset of this GuideDataProviders collection. Each object in the new collection has an associated MetaProperty object that meets the condition specified in the MetaPropertyCondition object.

Syntax

HRESULT get_ItemsWithMetaPropertyCond(
  IMetaPropertyCondition*  pcond,
  IGuideDataProviders**  ppdataproviders
);

Parameters

pcond

[in]  Specifies the IMetaPropertyCondition interface of the MetaPropertyCondition object.

ppdataproviders

[out]  Address of a variable to receive a pointer to the IGuideDataProviders interface of the retrieved collection.

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_OUTOFMEMORY There is not sufficient memory to create the collection.
E_POINTER Data cannot be read from or written to a supplied address.

Remarks

The following example code shows how to use this method:

IMetaProperty* pMetaProperty;
IGuideDataProviders* pGuideDataProviders;
 
// Initialization of the MetaProperty and GuideDataProviders
// objects is omitted.
 
// Create the MetaPropertyCondition object to do an "equals" test.
 
IMetaPropertyCondition* pMetaPropertyCondition;
pMetaProperty->get_Cond(_bstr_t(L"="), &pMetaPropertyCondition);
 
IGuideDataProviders* pSubset = NULL;
pGuideDataProviders->get_ItemsWithMetaPropertyCond(pMetaPropertyCondition,
                                                   &pSubset);

Now pSubset points to a GuideDataProviders collection that contains only GuideDataProvider objects that have metaproperties equal to the metaproperties represented by pMetaProperty. The match considers the MetaPropertyType, language, and value.

See Also