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

 

Replaces text without deleting markers.

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

int ReloadStream(
	int iPos,
	int iOldLen,
	IntPtr pszText,
	int iNewLen
)

Parameters

iPos
Type: System::Int32

[in] Starting position in the text buffer.

iOldLen
Type: System::Int32

[in] Length of text to reload.

pszText
Type: System::IntPtr

[in] Pointer to text to insert.

iNewLen
Type: System::Int32

[in] Length of the newly inserted text.

Return Value

Type: System::Int32

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

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.

Return to top
Show: