Microsoft DirectX 8.1 (C++)

IMetaPropertySets::get_Lookup

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

The get_Lookup method retrieves a MetaPropertyType object by name from the specified MetaPropertySet collection.

Syntax

HRESULT get_Lookup(
  BSTR  bstrName,
  IMetaPropertyType**  ppproptype
);

Parameters

bstrName

[in]  Specifies the name of the MetaPropertySet collection within which to find the MetaPropertyType object, and the name of the MetaPropertyType object, separated by a period. See Remarks.

ppproptype

[out]  Address of a variable to receive the IMetaPropertyType 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 bstr is not a valid name.
E_POINTER Data cannot be read from or written to a supplied address.

Remarks

The first period in bstrName is interpreted as a separator between the name of the MetaPropertySet and the name of the MetaPropertyType.

The following sample code retrieves the MetaPropertyType object named "Title" in the MetaPropertySet collection named "Description". Assume that pSets is a valid IMetaPropertySets pointer.

IMetaPropertyType *pPropTypeTitle;
 
CComBSTR DescTitle= "Description.Title";
HRESULT hr = pSets->get_Lookup (DescTitle,&pPropTypeTitle );

The preceding example is equivalent to the following:

CComBSTR Desc = "Description";
CComBSTR Title = "Title";
IMetaPropertySet *pSet;
IMetaPropertyTypes *pTypes;
IMetaPropertyType *pPropTypeTitle;
 
pSets->get_ItemWithName(Desc, &pSet);
pSet->get_MetaPropertyTypes(&pTypes);
pTypes->get_ItemWithName(Title, &pPropTypeTitle);

See Also