IVsTextStream.ReplaceStream(Int32, Int32, IntPtr, Int32) Method

Definition

Handles editing, such as line breaking, line joining, and so on.

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

Parameters

iPos
Int32

[in] Starting position in the text buffer.

iOldLen
Int32

[in] Length of text to reload.

pszText
IntPtr

nativeint

[in] Text to insert.

iNewLen
Int32

[in] Length of the newly inserted text.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

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

Use this method to complete any change to the text in the buffer. To replace text without replacing markers, use ReloadStream.

Applies to