Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Retrieves the line number information for lines contained in a specified virtual address (VA) range.

HRESULT findLinesByVA ( 
   ULONGLONG             va,
   DWORD                 length,
   IDiaEnumLineNumbers** ppResult


[in] Specifies the address as a VA.


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


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

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

IDiaEnumLineNumbers *GetLineNumbersByVA(IDiaSymbol *pFunc, IDiaSession *pSession)
    IDiaEnumLineNumbers* pEnum = NULL;
    ULONGLONG            va;
    ULONGLONG            length;

    if (pFunc->get_virtualAddress ( &va ) == S_OK)
        pFunc->get_length( &length );
        pSession->findLinesByVA( va, static_cast<DWORD>( length ), &pEnum );
© 2015 Microsoft