IVsTextStream.ReplaceStream(Int32, Int32, IntPtr, Int32) 方法

定义

处理编辑,如换行、行联接等。

public:
 int ReplaceStream(int iPos, int iOldLen, IntPtr pszText, int iNewLen);
public int ReplaceStream (int iPos, int iOldLen, IntPtr pszText, int iNewLen);
abstract member ReplaceStream : int * int * nativeint * int -> int
Public Function ReplaceStream (iPos As Integer, iOldLen As Integer, pszText As IntPtr, iNewLen As Integer) As Integer

参数

iPos
Int32

中文本缓冲区中的起始位置。

iOldLen
Int32

中要重载的文本长度。

pszText
IntPtr

nativeint

中要插入的文本。

iNewLen
Int32

中新插入文本的长度。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr:

HRESULT IVsTextStream::ReplaceStream(  
   [in] long iPos,  
   [in] long iOldLen,  
   [in] LPCOLESTR pszText,  
   [in] long iNewLen  
);  

使用此方法完成对缓冲区中的文本所做的任何更改。 若要在不替换标记的情况下替换文本,请使用 ReloadStream

适用于