IDiaSectionContrib

检索描述部分大的数据,也就是说,连续内存块导致该图像被编译。

IDiaSectionContrib : IUnknown

方法按 Vtable 顺序

下表显示 IDiaSectionContrib方法。

方法

说明

IDiaSectionContrib::get_compiland

检索对提供本节的编译符号。

IDiaSectionContrib::get_addressSection

检索的地址的部分部件。

IDiaSectionContrib::get_addressOffset

检索的地址的偏移量部件。

IDiaSectionContrib::get_relativeVirtualAddress

检索大的图像相对 (RVA)虚拟地址。

IDiaSectionContrib::get_virtualAddress

检索大的 (VA)虚拟地址。

IDiaSectionContrib::get_length

检索中的字节数部分。

IDiaSectionContrib::get_notPaged

检索指示的标志该部分是否不能对内存不足。

IDiaSectionContrib::get_nopad

检索指示是否的标志不应填充该部分到下一个内存边界。

IDiaSectionContrib::get_code

检索指示的标志该部分是否包含可执行代码。

IDiaSectionContrib::get_code16bit

检索指示的标志该部分是否包含 16 位代码。

IDiaSectionContrib::get_initializedData

检索指示的标志该部分是否包含初始化的数据。

IDiaSectionContrib::get_uninitializedData

检索指示的标志该部分是否包含未初始化的数据。

IDiaSectionContrib::get_informational

检索指示部分是否的标志包含注释或类似的信息。

IDiaSectionContrib::get_remove

检索指示的标记是否移除的部分,在它生成的一部分内存图像之前。

IDiaSectionContrib::get_comdat

检索指示的标志该部分是否是 COMDAT 记录。

IDiaSectionContrib::get_discardable

检索指示的标志是否可以放弃该部分。

IDiaSectionContrib::get_notCached

检索指示的标记是否不能缓存部分。

IDiaSectionContrib::get_share

检索指示的标志该部分是否在内存可能共享。

IDiaSectionContrib::get_execute

检索指示的标志节是否可执行文件作为代码。

IDiaSectionContrib::get_read

检索指示的标志该部分是否可以读取。

IDiaSectionContrib::get_write

检索指示的标志该部分是否进行编写。

IDiaSectionContrib::get_dataCrc

检索数据的 (CRC)循环冗余检查在节中。

IDiaSectionContrib::get_relocationsCrc

检索重定位信息的 CRC 节的。

IDiaLineNumber::get_compilandId

检索节的编译标识符。

备注

调用方的说明

此接口通过调用 IDiaEnumSectionContribs::ItemIDiaEnumSectionContribs::Next 方法获取。用于获取 IDiaSectionContrib 接口的示例参见 IDiaEnumSectionContribs 接口。

示例

此功能与任何关联的符号一起显示每个部分地址。请参见 IDiaEnumSectionContribs 接口发现 IDiaSectionContrib 接口如何获取。

void PrintSectionContrib(IDiaSectionContrib* pSecContrib, IDiaSession* pSession)
{
    if (pSecContrib != NULL && pSession != NULL)
    {
        DWORD rva;
        if ( pSecContrib->get_relativeVirtualAddress( &rva ) == S_OK )
        {
            printf( "\taddr: 0x%.8X", rva );
            pSecContrib = NULL;
            CComPtr<IDiaSymbol> pSym;
            if ( psession->findSymbolByRVA( rva, SymTagNull, &pSym ) == S_OK )
            {
                CDiaBSTR name;
                DWORD    tag;
                pSym->get_symTag( &tag );
                pSym->get_name( &name );
                printf( "     symbol: %ws (%ws)\n",
                        name != NULL ? name : L"",
                        szTags[ tag ] );
            }
            else
            {
                printf( "<no symbol found?>\n" );
            }
        }
        else
        {
            DWORD isect;
            DWORD offset;
            pSecContrib->get_addressSection( &isect );
            pSecContrib->get_addressOffset( &offset );
            printf( "\taddr: 0x%.4X:0x%.8X", isect, offset );
            pSecContrib = NULL;
            CComPtr<IDiaSymbol> pSym;
            if ( SUCCEEDED( psession->findSymbolByAddr(
                                              isect,
                                              offset,
                                              SymTagNull,
                                              &pSym )
                          )
               )
            {
                CDiaBSTR name;
                DWORD    tag;
                pSym->get_symTag( &tag );
                pSym->get_name( &name );
                printf( "     symbol: %ws (%ws)\n",
                    name != NULL ? name : L"",
                    szTags[ tag ] );
            }
            else
            {
                printf( "<no symbol found?>\n" );
            }
        }
    }
}

要求

标题:Dia2.h

库:diaguids.lib

DLL:msdia80.dll

请参见

参考

IDiaEnumSectionContribs

IDiaEnumSectionContribs::Item

IDiaEnumSectionContribs::Next

其他资源

接口(调试接口访问 SDK)