IDebugSymbols::GetOffsetByLine method

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

Line [in]

Specifies the line number in the source file.

File [in]

Specifies the file name of the source file.

Offset [out]

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 codeDescription
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

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugSymbols
IDebugSymbols2
IDebugSymbols3
GetLineByOffset

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft