Debugging Tools for Windows |
The GetOffsetByLine and GetOffsetByLineWide methods return the location of the instruction that corresponds to a specified line in the source code.
IDebugSymbols::GetOffsetByLine(
IN ULONG Line,
IN PCSTR File,
OUT PULONG64 Offset
);
IdebugSymbols3::GetOffsetByLineWide(
IN ULONG Line,
IN PCWSTR File,
OUT PULONG64 Offset
);
#ifdef UNICODE
#define GetOffsetByLineT GetOffsetByLineWide
#else
#define GetOffsetByLineT GetOffsetByLine
#endif
These methods can also return error values. See Return Values for more details.
GetOffsetByLine is available in all versions of IDebugSymbols. GetOffsetByLineWide is available in IDebugSymbols3 and later versions.
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.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.