Partager via


IVsTextLayer.GetLineText(Int32, Int32, Int32, Int32, String) Method

Definition

Gets the specified span of text.

public:
 int GetLineText(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, [Runtime::InteropServices::Out] System::String ^ % pbstrBuf);
int GetLineText(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, [Runtime::InteropServices::Out] std::wstring const & & pbstrBuf);
public int GetLineText (int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, out string pbstrBuf);
abstract member GetLineText : int * int * int * int * string -> int
Public Function GetLineText (iStartLine As Integer, iStartIndex As Integer, iEndLine As Integer, iEndIndex As Integer, ByRef pbstrBuf As String) As Integer

Parameters

iStartLine
Int32

[in] Starting line.

iStartIndex
Int32

[in] Starting character index within the line (must be <= length of line).

iEndLine
Int32

[in] Ending line.

iEndIndex
Int32

[in] Ending character index within the line (must be <= length of line).

pbstrBuf
String

[out] Text of the span.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextLayer::GetLineText(  
   [in] long iStartLine,  
   [in] CharIndex iStartIndex,  
   [in] long iEndLine,  
   [in] CharIndex iEndIndex,  
   [out] BSTR * pbstrBuf  
);  

Applies to