IObjectCol::get_Item

Meta Data Services Programming

Meta Data Services Programming

IObjectCol::get_Item

This method retrieves the specified object from the collection.

HRESULT get_Item(     VARIANT                  sItem,
    IRepositoryObject   **ppIReposObj
)

Parameters

sItem

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

*ppIReposObj

[out]
The IRepositoryObject interface pointer for the version of the specified object from the collection.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

Remarks

When this method is invoked through the ITargetObjectCol interface (which inherits this method from the IObjectCol interface), an object can also be retrieved by name, but only if it is the destination object of a naming relationship.

This method returns a specific version of the item. To choose which version, the repository engine follows a resolution strategy.

See Also

IObjectCol Interface

IRepositoryObject Interface

Resolution Strategy for Objects and Object Versions