IVsTextLines.CreateLineMarker Method
Creates a 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
'宣告
Function CreateLineMarker ( _
iMarkerType As Integer, _
iStartLine As Integer, _
iStartIndex As Integer, _
iEndLine As Integer, _
iEndIndex As Integer, _
pClient As IVsTextMarkerClient, _
<OutAttribute> ppMarker As IVsTextLineMarker() _
) As Integer
'用途
Dim instance As IVsTextLines
Dim iMarkerType As Integer
Dim iStartLine As Integer
Dim iStartIndex As Integer
Dim iEndLine As Integer
Dim iEndIndex As Integer
Dim pClient As IVsTextMarkerClient
Dim ppMarker As IVsTextLineMarker()
Dim returnValue As Integer
returnValue = instance.CreateLineMarker(iMarkerType, _
iStartLine, iStartIndex, iEndLine, _
iEndIndex, pClient, ppMarker)
int CreateLineMarker(
int iMarkerType,
int iStartLine,
int iStartIndex,
int iEndLine,
int iEndIndex,
IVsTextMarkerClient pClient,
IVsTextLineMarker[] ppMarker
)
int CreateLineMarker(
[InAttribute] int iMarkerType,
[InAttribute] int iStartLine,
[InAttribute] int iStartIndex,
[InAttribute] int iEndLine,
[InAttribute] int iEndIndex,
[InAttribute] IVsTextMarkerClient^ pClient,
[OutAttribute] array<IVsTextLineMarker^>^ ppMarker
)
abstract CreateLineMarker :
iMarkerType:int *
iStartLine:int *
iStartIndex:int *
iEndLine:int *
iEndIndex:int *
pClient:IVsTextMarkerClient *
ppMarker:IVsTextLineMarker[] byref -> int
function CreateLineMarker(
iMarkerType : int,
iStartLine : int,
iStartIndex : int,
iEndLine : int,
iEndIndex : int,
pClient : IVsTextMarkerClient,
ppMarker : IVsTextLineMarker[]
) : int
Parameters
- iMarkerType
Type: System.Int32
[in] Type of marker to create.
- iStartLine
Type: System.Int32
[in] Starting line.
- iStartIndex
Type: System.Int32
[in] Starting character index within the line. Must be less than or equal to the length of the line.
- iEndLine
Type: System.Int32
[in] Ending line.
- iEndIndex
Type: System.Int32
[in] Ending character index within the line. Must be less than or equal to the length of the line.
- 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.IVsTextLineMarker[]
[out] Pointer to the IVsTextLineMarker interface (that is, the text marker). If this parameter is nulla null reference (Nothing in Visual Basic), then the marker is owned by the text buffer. An example of a buffer-owned 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 IVsTextLines::CreateLineMarker(
[in] long iMarkerType,
[in] long iStartLine,
[in] CharIndex iStartIndex,
[in] long iEndLine,
[in] CharIndex iEndIndex,
[in] IVsTextMarkerClient * pClient,
[out] IVsTextLineMarker ** 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.
注意
The markers created using IVsTextLines.CreateLineMarker are line-oriented markers. Use CreateStreamMarker to create stream-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.