Partilhar via


Método IVsTextStream.GetStream

Fornece acesso direto, orientado por fluxo para o buffer de texto.

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

Sintaxe

'Declaração
Function GetStream ( _
    iPos As Integer, _
    iLength As Integer, _
    pszDest As IntPtr _
) As Integer
int GetStream(
    int iPos,
    int iLength,
    IntPtr pszDest
)
int GetStream(
    [InAttribute] int iPos, 
    [InAttribute] int iLength, 
    [InAttribute] IntPtr pszDest
)
abstract GetStream : 
        iPos:int * 
        iLength:int * 
        pszDest:IntPtr -> int
function GetStream(
    iPos : int, 
    iLength : int, 
    pszDest : IntPtr
) : int

Parâmetros

  • iPos
    Tipo: Int32

    [in] Posição inicial no buffer de texto

  • iLength
    Tipo: Int32

    [in] Comprimento do fluxo de texto para acessar. 

  • pszDest
    Tipo: IntPtr

    [in] O buffer de seqüência alocado pelo chamador. Esse buffer é preenchido com o texto solicitado.

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 IVsTextStream::GetStream(
   [in] long iPos,
   [in] long iLength,
   [out] WCHAR *pszDest
);

Ao usar esse método, não se esqueça de alocar um buffer de tamanho iLength + 1, porque essa chamada acrescenta uma nulluma referência nula (Nothing no Visual Basic) para a matriz de caracteres.

Segurança do .NET Framework

Consulte também

Referência

IVsTextStream Interface

Namespace Microsoft.VisualStudio.TextManager.Interop