Skip to content

Delete unnecessary spaces #2417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 58 additions & 58 deletions docs/debugger/debug-interface-access/idiasession-findlinesbyaddr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,70 @@
title: "IDiaSession::findLinesByAddr | Microsoft Docs"
ms.date: "11/04/2016"
ms.topic: "conceptual"
dev_langs:
dev_langs:
- "C++"
helpviewer_keywords:
helpviewer_keywords:
- "IDiaSession::findLinesByAddr method"
ms.assetid: 640403c0-14cf-403c-ad19-38b3bdc28ca8
author: "mikejo5000"
ms.author: "mikejo"
manager: jillfra
ms.workload:
ms.workload:
- "multiple"
---
# IDiaSession::findLinesByAddr
Retrieves the lines in a specified compiland that contain a specified address.
## Syntax
```C++
HRESULT findLinesByAddr ( 
DWORD seg,
DWORD offset,
DWORD length,
IDiaEnumLineNumbers** ppResult
);
```
#### Parameters
`seg`
[in] Specifies the section component of the specific address.
`offset`
[in] Specifies the offset component of the specific address.
`length`
[in] Specifies the number of bytes of address range to cover with this query.
`ppResult`
[out] Returns an [IDiaEnumLineNumbers](../../debugger/debug-interface-access/idiaenumlinenumbers.md) 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 a function using the function's address and length.
```C++
IDiaEnumLineNumbers* GetLineNumbersByAddr(IDiaSymbol *pFunc,
IDiaSession *pSession)
{
IDiaEnumLineNumbers* pEnum = NULL;
DWORD seg;
DWORD offset;
ULONGLONG length;
if (pFunc->get_addressSection ( &seg ) == S_OK &&
pFunc->get_addressOffset ( &offset ) == S_OK)
{
pFunc->get_length ( &length );
pSession->findLinesByAddr( seg, offset, static_cast<DWORD>( length ), &pEnum );
}
return(pEnum);
}
```
## See Also
[IDiaEnumLineNumbers](../../debugger/debug-interface-access/idiaenumlinenumbers.md)
[IDiaSession](../../debugger/debug-interface-access/idiasession.md)
[IDiaSession::findLinesByVA](../../debugger/debug-interface-access/idiasession-findlinesbyva.md)
Retrieves the lines in a specified compiland that contain a specified address.

## Syntax

```C++
HRESULT findLinesByAddr (
DWORD seg,
DWORD offset,
DWORD length,
IDiaEnumLineNumbers** ppResult
);
```

#### Parameters
`seg`
[in] Specifies the section component of the specific address.

`offset`
[in] Specifies the offset component of the specific address.

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

`ppResult`
[out] Returns an [IDiaEnumLineNumbers](../../debugger/debug-interface-access/idiaenumlinenumbers.md) 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 a function using the function's address and length.

```C++
IDiaEnumLineNumbers* GetLineNumbersByAddr(IDiaSymbol *pFunc,
IDiaSession *pSession)
{
IDiaEnumLineNumbers* pEnum = NULL;
DWORD seg;
DWORD offset;
ULONGLONG length;

if (pFunc->get_addressSection ( &seg ) == S_OK &&
pFunc->get_addressOffset ( &offset ) == S_OK)
{
pFunc->get_length ( &length );
pSession->findLinesByAddr( seg, offset, static_cast<DWORD>( length ), &pEnum );
}
return(pEnum);
}
```
## See Also
[IDiaEnumLineNumbers](../../debugger/debug-interface-access/idiaenumlinenumbers.md)
[IDiaSession](../../debugger/debug-interface-access/idiasession.md)
[IDiaSession::findLinesByVA](../../debugger/debug-interface-access/idiasession-findlinesbyva.md)