IDebugSymbols3::GetOffsetByLine method (dbgeng.h)

The GetOffsetByLine method returns the location of the instruction that corresponds to a specified line in the source code.

Syntax

HRESULT GetOffsetByLine(
  [in]  ULONG    Line,
  [in]  PCSTR    File,
  [out] PULONG64 Offset
);

Parameters

[in] Line

Specifies the line number in the source file.

[in] File

Specifies the file name of the source file.

[out] Offset

Receives the location in the target's virtual address space of an instruction for the specified line.

Return value

This method may also return other error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.

Remarks

A line in a source file might correspond to multiple instructions and this method can return any one of these instructions.

For more information about source files, see Using Source Files.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetLineByOffset

IDebugSymbols

IDebugSymbols2

IDebugSymbols3