Compartir a través de


IVsTextImage.GetText Method

Return the text of a text span.

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

Syntax

'Declaration
Function GetText ( _
    pts As TextSpan(), _
    cch As Integer, _
    <OutAttribute> psz As UShort() _
) As Integer
int GetText(
    TextSpan[] pts,
    int cch,
    ushort[] psz
)
int GetText(
    [InAttribute] array<TextSpan>^ pts, 
    [InAttribute] int cch, 
    [OutAttribute] array<unsigned short>^ psz
)
abstract GetText : 
        pts:TextSpan[] * 
        cch:int * 
        psz:uint16[] byref -> int
function GetText(
    pts : TextSpan[], 
    cch : int, 
    psz : ushort[]
) : int

Parameters

  • cch
    Type: System.Int32

    [in] Number of characters to return.

  • psz
    Type: array<System.UInt16[]

    [out] Pointer to a null terminated string containing the text.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextImage::GetText(
   [in] const TextSpan * pts,
   [in] LONG cch,
   [out, size_is(cch)] LPOLESTR psz
);

.NET Framework Security

See Also

Reference

IVsTextImage Interface

Microsoft.VisualStudio.TextManager.Interop Namespace