IVsTextLines.GetLineText, méthode

Retourne l'étendue spécifiée du texte dans BSTR.

Espace de noms :  Microsoft.VisualStudio.TextManager.Interop
Assembly :  Microsoft.VisualStudio.TextManager.Interop (dans Microsoft.VisualStudio.TextManager.Interop.dll)

Syntaxe

'Déclaration
Function GetLineText ( _
    iStartLine As Integer, _
    iStartIndex As Integer, _
    iEndLine As Integer, _
    iEndIndex As Integer, _
    <OutAttribute> ByRef pbstrBuf As String _
) As Integer
int GetLineText(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex,
    out string pbstrBuf
)
int GetLineText(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex, 
    [OutAttribute] String^% pbstrBuf
)
abstract GetLineText : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pbstrBuf:string byref -> int
function GetLineText(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int, 
    pbstrBuf : String
) : int

Paramètres

  • iStartLine
    Type : Int32

    [in] à partir de la ligne.

  • iStartIndex
    Type : Int32

    [in] démarrant l'index de caractère dans la ligne. Cette valeur doit être inférieur ou égal à la longueur de la ligne.

  • iEndLine
    Type : Int32

    [in] terminant la ligne.

  • iEndIndex
    Type : Int32

    [in] index de caractère de fin dans la ligne. Cette valeur doit être inférieur ou égal à la longueur de la ligne.

  • pbstrBuf
    Type : String%

    [] en texte pour insérer, si.

Valeur de retour

Type : Int32
Si la méthode réussit, elle retourne S_OK.En cas d'échec, un code d'erreur est retourné.

Notes

Signature de COM

De textmgr.idl :

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

Il est de la responsabilité de l'appelant de libérer BSTR.

Sécurité .NET Framework

Voir aussi

Référence

IVsTextLines Interface

Microsoft.VisualStudio.TextManager.Interop, espace de noms