Compartilhar via


IVsTextStream.ReplaceStreamEx 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 ReplaceStreamEx ( _
    dwFlags As UInteger, _
    iPos As Integer, _
    iOldLen As Integer, _
    pszText As IntPtr, _
    iNewLen As Integer, _
    <OutAttribute> ByRef piActualLen As Integer _
) As Integer
int ReplaceStreamEx(
    uint dwFlags,
    int iPos,
    int iOldLen,
    IntPtr pszText,
    int iNewLen,
    out int piActualLen
)
int ReplaceStreamEx(
    [InAttribute] unsigned int dwFlags, 
    [InAttribute] int iPos, 
    [InAttribute] int iOldLen, 
    [InAttribute] IntPtr pszText, 
    [InAttribute] int iNewLen, 
    [OutAttribute] int% piActualLen
)
abstract ReplaceStreamEx : 
        dwFlags:uint32 * 
        iPos:int * 
        iOldLen:int * 
        pszText:IntPtr * 
        iNewLen:int * 
        piActualLen:int byref -> int
function ReplaceStreamEx(
    dwFlags : uint, 
    iPos : int, 
    iOldLen : int, 
    pszText : IntPtr, 
    iNewLen : int, 
    piActualLen : 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.

  • piActualLen
    Type: System.Int32%

    [out] Number of characters changed.

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::ReplaceStreamEx(
   [in] DWORD dwFlags,
   [in] long iPos,
   [in] long iOldLen,
   [in] const WCHAR *pszText,
   [in] long iNewLen,
   [out] long *piActualLen
);

Similar to IReplaceStream, but allows you to specify additional options in the dwFlags parameter.

.NET Framework Security

See Also

Reference

IVsTextStream Interface

Microsoft.VisualStudio.TextManager.Interop Namespace