Share via


VsTextBufferClass.CopyLineText Method

Puts the specified span of text into a caller-allocated buffer (an array).

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Public Overridable Function CopyLineText ( _
    iStartLine As Integer, _
    iStartIndex As Integer, _
    iEndLine As Integer, _
    iEndIndex As Integer, _
    pszBuf As IntPtr, _
    <OutAttribute> ByRef pcchBuf As Integer _
) As Integer
public virtual int CopyLineText(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex,
    IntPtr pszBuf,
    out int pcchBuf
)
public:
virtual int CopyLineText(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex, 
    [InAttribute] IntPtr pszBuf, 
    [InAttribute] [OutAttribute] int% pcchBuf
)
abstract CopyLineText : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pszBuf:IntPtr * 
        pcchBuf:int byref -> int  
override CopyLineText : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pszBuf:IntPtr * 
        pcchBuf:int byref -> int
public function CopyLineText(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int, 
    pszBuf : IntPtr, 
    pcchBuf : int
) : int

Parameters

  • iStartIndex
    Type: System.Int32

    [in] Starting character index within the line. Must be less than or equal to the length of the line.

  • iEndIndex
    Type: System.Int32

    [in] Ending character index within the line. Must be less than or equal to the length of the line.

  • pszBuf
    Type: System.IntPtr

    [in] Pointer to a caller-allocated buffer.

  • pcchBuf
    Type: System.Int32%

    [in, out] Pointer to a count of Unicode characters — not bytes.

Return Value

Type: System.Int32
If the method succeeds, returns S_OK; otherwise, returns an error code.

Implements

IVsTextLines.CopyLineText(Int32, Int32, Int32, Int32, IntPtr, Int32%)

.NET Framework Security

See Also

Reference

VsTextBufferClass Class

Microsoft.VisualStudio.TextManager.Interop Namespace