IVsTextImage.GetTextBSTR Method

Return the text of a text span as a BSTR

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

Syntax

'宣言
Function GetTextBSTR ( _
    pts As TextSpan(), _
    <OutAttribute> ByRef pbstrText As String _
) As Integer
'使用
Dim instance As IVsTextImage
Dim pts As TextSpan()
Dim pbstrText As String
Dim returnValue As Integer

returnValue = instance.GetTextBSTR(pts, _
    pbstrText)
int GetTextBSTR(
    TextSpan[] pts,
    out string pbstrText
)
int GetTextBSTR(
    [InAttribute] array<TextSpan>^ pts, 
    [OutAttribute] String^% pbstrText
)
function GetTextBSTR(
    pts : TextSpan[], 
    pbstrText : String
) : int

Parameters

  • pts
    Type: []

    [in] Pointer to a TextSpan structure.

  • pbstrText
    Type: System.String%

    [out] Pointer to a BSTR 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::GetTextBSTR(
   [in] const TextSpan * pts,
   [out, retval] BSTR * pbstrText
);

Permissions

See Also

Reference

IVsTextImage Interface

IVsTextImage Members

Microsoft.VisualStudio.TextManager.Interop Namespace