VsTextBufferClass.CopyLineText 方法

将文本指定的范围到调用方分配的缓冲区 (数组)。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
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

参数

  • iStartLine
    类型:Int32

    [in] 启动行。

  • iStartIndex
    类型:Int32

    [in] 行中的起始字符的索引。 必须小于或等于行的长度。

  • iEndLine
    类型:Int32

    [in] 结束行。

  • iEndIndex
    类型:Int32

    [in] 在行内结束字符索引。 必须小于或等于行的长度。

  • pszBuf
    类型:IntPtr

    [in] 对调用方分配的缓冲区的指针。

  • pcchBuf
    类型:Int32%

    [in, out] 对计数的指针 Unicode 字符 " 是字节。

返回值

类型:Int32

实现

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

.NET Framework 安全性

请参阅

参考

VsTextBufferClass 类

Microsoft.VisualStudio.TextManager.Interop 命名空间