Partager via


IVsTextStream.ReplaceStream Method

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

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

Syntax

'Declaration
Function ReplaceStream ( _
    iPos As Integer, _
    iOldLen As Integer, _
    pszText As IntPtr, _
    iNewLen As Integer _
) As Integer
int ReplaceStream(
    int iPos,
    int iOldLen,
    IntPtr pszText,
    int iNewLen
)
int ReplaceStream(
    [InAttribute] int iPos, 
    [InAttribute] int iOldLen, 
    [InAttribute] IntPtr pszText, 
    [InAttribute] int iNewLen
)
abstract ReplaceStream : 
        iPos:int * 
        iOldLen:int * 
        pszText:IntPtr * 
        iNewLen:int -> int
function ReplaceStream(
    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::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.

.NET Framework Security

See Also

Reference

IVsTextStream Interface

Microsoft.VisualStudio.TextManager.Interop Namespace