Share via


IDiaSession::findLinesByVA

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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

Syntax

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

Parameters

va
[in] Specifies the address as a VA.

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.

Example

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 );  
    }  
    return(pEnum);  
}  

See Also

IDiaEnumLineNumbers
IDiaSession