Share via


IVsTextImageUtilities.GetReplaceText Method

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

Syntax

'Declaration
Function GetReplaceText ( _
    grfOptions As UInteger, _
    pszReplace As String, _
    pText As IVsTextImage, _
    pMatch As TextSpan(), _
    pTags As IVsTextSpanSet, _
    <OutAttribute> ByRef pbstrComputedText As String _
) As Integer
int GetReplaceText(
    uint grfOptions,
    string pszReplace,
    IVsTextImage pText,
    TextSpan[] pMatch,
    IVsTextSpanSet pTags,
    out string pbstrComputedText
)
int GetReplaceText(
    [InAttribute] unsigned int grfOptions, 
    [InAttribute] String^ pszReplace, 
    [InAttribute] IVsTextImage^ pText, 
    [InAttribute] array<TextSpan>^ pMatch, 
    [InAttribute] IVsTextSpanSet^ pTags, 
    [OutAttribute] String^% pbstrComputedText
)
abstract GetReplaceText : 
        grfOptions:uint32 * 
        pszReplace:string * 
        pText:IVsTextImage * 
        pMatch:TextSpan[] * 
        pTags:IVsTextSpanSet * 
        pbstrComputedText:string byref -> int 
function GetReplaceText(
    grfOptions : uint, 
    pszReplace : String, 
    pText : IVsTextImage, 
    pMatch : TextSpan[], 
    pTags : IVsTextSpanSet, 
    pbstrComputedText : String
) : int

Parameters

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 textfind.idl:

HRESULT IVsTextImageUtilities::GetReplaceText(
   [in] VSFINDOPTIONS grfOptions,
   [in] LPCOLESTR pszReplace,
   [in] IVsTextImage * pText,
   [in] const TextSpan * pMatch,
   [in] IVsTextSpanSet * pTags,
   [out, retval] BSTR * pbstrComputedText
);

If you do not have a regex find/replace with tags, pTags can be nulla null reference (Nothing in Visual Basic). If you have pTags, pMatch can be null.

.NET Framework Security

See Also

Reference

IVsTextImageUtilities Interface

Microsoft.VisualStudio.TextManager.Interop Namespace