IDiaTable::Item

在表中检索对指定的项。

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

参数

  • index
    [in] 表项的索引在范围为 0 到 -1 count的,其中 count 用 IDiaTable::get_Count方法返回。

  • element
    [out] 返回表示指定的表项的 IUnknown 对象。

返回值

如果成功,则返回; S_OK否则,返回错误代码。

备注

表表示对象的集合。基于这些对象元素,参数可以转换为适当的接口。例如,因此,如果表包含 IDiaSegment 对象,然后元素参数可以将强制转换为 IDiaSegment 接口。

它是调用 IDiaTable 接口的 QueryInterface 方法适当的枚举器接口的和使用枚举数的特定方法的更常见的访问表内容。有关示例参见 IDiaEnumInjectedSources 接口。

请参见

参考

IDiaTable

IDiaTable::get_Count

IDiaSegment

IDiaEnumInjectedSources