IDiaEnumSegments

枚举数据源包含的各段。

IDiaEnumSegments : IUnknown

方法按 Vtable 顺序

下表显示 IDiaEnumSegments方法。

方法

说明

IDiaEnumSegments::get__NewEnum

检索此枚举器的 IEnumVARIANT Interface 版本。

IDiaEnumSegments::get_Count

检索段的数目。

IDiaEnumSegments::Item

通过索引检索段。

IDiaEnumSegments::Next

检索段指定数目的枚举序列的。

IDiaEnumSegments::Skip

跳过段指定数目的枚举序列的。

IDiaEnumSegments::Reset

重置枚举序列与开头。

IDiaEnumSegments::Clone

创建包含枚举状态和枚举当前枚举数相同的枚举数。

备注

调用方的说明

通过调用 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

请参见

参考

IDiaTable

IDiaSegment

其他资源

接口(调试接口访问 SDK)