次の方法で共有


IDiaSession::findLinesByRVA

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

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

Retrieves the lines in a specified compiland that contain a specified relative virtual address (RVA).

HRESULT findLinesByRVA ( 
   DWORD                 rva,
   DWORD                 length,
   IDiaEnumLineNumbers** ppResult
);

Parameters

  • rva
    [in] Specifies the address as an RVA.

  • length
    [in] Specifies the number of bytes of address range to cover with this query.

  • ppResult
    [out] Returns an IDiaEnumLineNumbers object that contains a list of all the line numbers that cover the specified address range.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Example

This example shows a function that obtains all line numbers contained in the specified function using the function's relative virtual address and length.

IDiaEnumLineNumbers* GetLineNumbersByRVA(IDiaSymbol *pFunc, IDiaSession *pSession)
{
    IDiaEnumLineNumbers* pEnum = NULL;
    DWORD                rva;
    ULONGLONG            length;

    if (pFunc->get_relativeVirtualAddress ( &rva ) == S_OK)
    {
        pFunc->get_length ( &length );
        pSession->findLinesByRVA( rva, static_cast<DWORD>( length ), &pEnum );
    }
    return(pEnum);
}

See Also

IDiaEnumLineNumbers
IDiaSession
Glossary of DIA SDK Terms