Partilhar via


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

Definition

Replaces text without deleting markers.

public:
 int ReloadStream(int iPos, int iOldLen, IntPtr pszText, int iNewLen);
public int ReloadStream (int iPos, int iOldLen, IntPtr pszText, int iNewLen);
abstract member ReloadStream : int * int * nativeint * int -> int
Public Function ReloadStream (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] Pointer to 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::ReloadStream(  
   [in] long iPos,  
   [in] long iOldLen,  
   [in] const WCHAR *pszText,  
   [in] long iNewLen  
);  

In ReloadStream, text is replaced, but markers are not deleted. Use this method only in special circumstances, such as when a buffer is being reloaded from disk or when a wizard is substituting a particular section of code.

Applies to