IVsTextStream.CreateStreamMarker Method (Int32, Int32, Int32, IVsTextMarkerClient, IVsTextStreamMarker[])
Creates a stream marker of a given type over the specified region.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
int CreateStreamMarker( int iMarkerType, int iPos, int iLength, IVsTextMarkerClient pClient, IVsTextStreamMarker[] ppMarker )
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:
Microsoft.VisualStudio.TextManager.Interop.IVsTextStreamMarker[]
[out] Pointer to the IVsTextStreamMarker interface. If this parameter is null, 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.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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. |
