Partilhar via


Método IVsTextView.GetSelectedText

Retorna uma cópia do texto selecionado.

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

Sintaxe

'Declaração
Function GetSelectedText ( _
    <OutAttribute> ByRef pbstrText As String _
) As Integer
int GetSelectedText(
    out string pbstrText
)
int GetSelectedText(
    [OutAttribute] String^% pbstrText
)
abstract GetSelectedText : 
        pbstrText:string byref -> int
function GetSelectedText(
    pbstrText : String
) : int

Parâmetros

  • pbstrText
    Tipo: String%

    [out] Se o método for bem-sucedido, especifica um ponteiro para uma seqüência de caracteres que contém o texto.

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De textmgr.idl:

HRESULT IVsTextView::GetSelectedText(
   [out] BSTR * pbstrText
);

Segurança do .NET Framework

Consulte também

Referência

IVsTextView Interface

Namespace Microsoft.VisualStudio.TextManager.Interop