IVsTextImage.Replace 方法

文本范围替换的通知。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
Function Replace ( _
    dwFlags As UInteger, _
    pts As TextSpan(), _
    cch As Integer, _
    pchText As String, _
    <OutAttribute> ptsChanged As TextSpan() _
) As Integer
int Replace(
    uint dwFlags,
    TextSpan[] pts,
    int cch,
    string pchText,
    TextSpan[] ptsChanged
)
int Replace(
    [InAttribute] unsigned int dwFlags, 
    [InAttribute] array<TextSpan>^ pts, 
    [InAttribute] int cch, 
    [InAttribute] String^ pchText, 
    [OutAttribute] array<TextSpan>^ ptsChanged
)
abstract Replace : 
        dwFlags:uint32 * 
        pts:TextSpan[] * 
        cch:int * 
        pchText:string * 
        ptsChanged:TextSpan[] byref -> int
function Replace(
    dwFlags : uint, 
    pts : TextSpan[], 
    cch : int, 
    pchText : String, 
    ptsChanged : TextSpan[]
) : int

参数

  • dwFlags
    类型:UInt32

    [in] 包含标志的双字。 以后使用。 设置为零。

  • cch
    类型:Int32

    [in] 计数。 pchText的字符。

  • pchText
    类型:String

    [in] 对文本字符串的指针。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

环境将调用 IVsTextImage.Replace 注意到文本范围完成时替换操作。 返回新的文本范围对环境。

COM 签名

从 textmgr.idl:

HRESULT IVsTextImage::Replace(
   [in] DWORD dwFlags,
   [in] const TextSpan * pts,
   [in] LONG cch,
   [in, size_is(cch)] LPCOLESTR pchText,
   [out, retval] TextSpan * ptsChanged
);

.NET Framework 安全性

请参阅

参考

IVsTextImage 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间