IDiaSession::findLinesByVA
Retrieves the line number information for lines contained in a specified virtual address (VA) range.
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);
}