次の方法で共有


IDiaTable::Item

[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

[このトピックはプレリリース版のため将来変更される可能性があります。また、プレースホルダとしてブランクのトピックが含まれています。]

Retrieves a reference to the specified entry in the table.

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

IDiaTable
IDiaTable::get_Count
IDiaSegment
IDiaEnumInjectedSources