IRelationshipCol::get_Item

Meta Data Services Programming

Meta Data Services Programming

IRelationshipCol::get_Item

This method retrieves the specified relationship from the collection.

HRESULT get_Item(
    VARIANT
         sItem,
    IRelationship   **ppIRelship
);

Parts

sItem

[in]
Identifies the item to be retrieved from the collection. This parameter can be the index, the name, or the object identifier of the item.

*ppIRelship

[out]
The IRelationship interface pointer for the specified relationship from the collection.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

Remarks

Each item in the collection is a versioned relationship. That is, it has a collection of TargetVersions. When you obtain a reference to the target object of a particular item (with the get_Target method of the IRelationship interface), the repository engine chooses a particular version of the target object from the items in the TargetVersions collection of the versioned relationship.

Using the sItem parameter to specify the relationship by destination object name is supported only for naming collections.

See Also

IRelationshipCol Interface

IRelationship Interface