IVsTextStream.CreateStreamMarker Method

Creates a stream marker of a given type over the specified region.

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

Syntax

'Declaration
Function CreateStreamMarker ( _
    iMarkerType As Integer, _
    iPos As Integer, _
    iLength As Integer, _
    pClient As IVsTextMarkerClient, _
    <OutAttribute> ppMarker As IVsTextStreamMarker() _
) As Integer
int CreateStreamMarker(
    int iMarkerType,
    int iPos,
    int iLength,
    IVsTextMarkerClient pClient,
    IVsTextStreamMarker[] ppMarker
)
int CreateStreamMarker(
    [InAttribute] int iMarkerType, 
    [InAttribute] int iPos, 
    [InAttribute] int iLength, 
    [InAttribute] IVsTextMarkerClient^ pClient, 
    [OutAttribute] array<IVsTextStreamMarker^>^ ppMarker
)
abstract CreateStreamMarker : 
        iMarkerType:int * 
        iPos:int * 
        iLength:int * 
        pClient:IVsTextMarkerClient * 
        ppMarker:IVsTextStreamMarker[] byref -> int
function CreateStreamMarker(
    iMarkerType : int, 
    iPos : int, 
    iLength : int, 
    pClient : IVsTextMarkerClient, 
    ppMarker : IVsTextStreamMarker[]
) : int

Parameters

  • iMarkerType
    Type: System.Int32

    [in] Type of marker to create.

  • iPos
    Type: System.Int32

    [in] Starting position in the text buffer.

  • iLength
    Type: System.Int32

    [in] Length of text to create marker over.

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::CreateStreamMarker(
   [in] long iMarkerType,
   [in] long iPos,
   [in] long iLength,
   [in] IVsTextMarkerClient *pClient,
   [out] IVsTextStreamMarker **ppMarker
);

This method creates a marker over the specified region. If you want to listen to marker events for the buffer, then pass in a pointer to the IVsTextMarkerClient interface in the pClient parameter.

Note

The markers created using CreateStreamMarker are stream-oriented markers. Use M:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines.CreateLineMarker(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient,Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker[]) to create line-oriented markers.

.NET Framework Security

See Also

Reference

IVsTextStream Interface

Microsoft.VisualStudio.TextManager.Interop Namespace