Freigeben über


IVsTextStream.ReloadStream Method

Replaces text without deleting markers.

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

Syntax

'Declaration
Function ReloadStream ( _
    iPos As Integer, _
    iOldLen As Integer, _
    pszText As IntPtr, _
    iNewLen As Integer _
) As Integer
int ReloadStream(
    int iPos,
    int iOldLen,
    IntPtr pszText,
    int iNewLen
)
int ReloadStream(
    [InAttribute] int iPos, 
    [InAttribute] int iOldLen, 
    [InAttribute] IntPtr pszText, 
    [InAttribute] int iNewLen
)
abstract ReloadStream : 
        iPos:int * 
        iOldLen:int * 
        pszText:IntPtr * 
        iNewLen:int -> int 
function ReloadStream(
    iPos : int, 
    iOldLen : int, 
    pszText : IntPtr, 
    iNewLen : int
) : int

Parameters

  • iPos
    Type: System.Int32
    [in] Starting position in the text buffer.
  • 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.

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.

.NET Framework Security

See Also

Reference

IVsTextStream Interface

Microsoft.VisualStudio.TextManager.Interop Namespace