IDiaTable::Item

Retrieves a reference to the specified entry in the table.

Syntax

HRESULT Item ( 
   DWORD      index,
   IUnknown** element
);

Parameters

index

[in] The index of the table entry in the range 0 to count-1, where count is returned by the IDiaTable::get_Countmethod.

element

[out] Returns an IUnknown object that represents the specified table entry.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

A table represents a collection of objects. Depending on those objects, the element parameter can be cast to the appropriate interface. For example, if a table contains IDiaSegment objects, then the element parameter can be cast to the IDiaSegment interface.

It is a more common approach to call the QueryInterface method in the IDiaTable interface for the appropriate enumerator interface and use the enumerator's specific methods to access the table contents. See the IDiaEnumInjectedSources interface for an example.

See also