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
'Declaração
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.
- pClient
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient
[in] Pointer to the IVsTextMarkerClient interface. Implement this interface to advise the text buffer that you want to receive notification of marker events.
- ppMarker
Type: array<Microsoft.VisualStudio.TextManager.Interop.IVsTextStreamMarker[]
[out] Pointer to the IVsTextStreamMarker interface. If this parameter is nulla null reference (Nothing in Visual Basic), then the text marker is owned by the text buffer. An example of a buffer-owned text marker is a temporary bookmark.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.