Freigeben über


IDebugDocumentContext2::GetSourceRange

Gets the source code range of this document context.

HRESULT GetSourceRange( 
   TEXT_POSITION* pBegPosition,
   TEXT_POSITION* pEndPosition
);
int GetSourceRange( 
   TEXT_POSITION[] pBegPosition,
   TEXT_POSITION[] pEndPosition
);

Parameters

  • pBegPosition
    [in, out] A TEXT_POSITION structure that is filled in with the starting position. Set this argument to a null value if this information is not needed.

  • pEndPosition
    [in, out] A TEXT_POSITION structure that is filled in with the ending position. Set this argument to a null value if this information is not needed.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

A source range is the entire range of source code, from the current statement back to just after the previous statement that contributed code. The source range is typically used for mixing source statements, including comments, with code in the disassembly window.

To get the range for just the code statements contained within this document context, call the IDebugDocumentContext2::GetStatementRange method.

See Also

Reference

IDebugDocumentContext2

IDebugDocumentContext2::GetStatementRange

TEXT_POSITION