枚举数据源包含的各段。
IDiaEnumSegments : IUnknown
方法按 Vtable 顺序
下表显示 IDiaEnumSegments方法。
方法 |
说明 |
---|---|
检索此枚举器的 IEnumVARIANT Interface 版本。 |
|
检索段的数目。 |
|
通过索引检索段。 |
|
检索段指定数目的枚举序列的。 |
|
跳过段指定数目的枚举序列的。 |
|
重置枚举序列与开头。 |
|
创建包含枚举状态和枚举当前枚举数相同的枚举数。 |
备注
调用方的说明
通过调用 IDiaTable 对象的 QueryInterface 方法获取此接口。请参见下面的示例有关详细信息。
示例
此示例演示如何从表的 IDiaEnumSections 接口。有关更完整的示例段,请参见 IDiaSegment 接口。
void ShowSegments(IDiaTable *pTable, IDiaSession *pSession)
{
CComPtr<IDiaEnumSegments> pSegments;
if ( SUCCEEDED( pTable->QueryInterface(
__uuidof( IDiaEnumSegments ),
(void**)&pSegments )
)
)
{
// Do something with this enumeration
}
}
要求
标题:Dia2.h
库:diaguids.lib
DLL:msdia80.dll