IVsTextLines.CreateLineMarker 方法

创建特定类型的标记在指定范围的。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
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
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

参数

  • iMarkerType
    类型:Int32

    [in] 创建的标记的类型。

  • iStartLine
    类型:Int32

    [in] 启动行。

  • iStartIndex
    类型:Int32

    [in] 行中的起始字符的索引。 必须小于或等于行的长度。

  • iEndLine
    类型:Int32

    [in] 结束行。

  • iEndIndex
    类型:Int32

    [in] 在行内结束字符索引。 必须小于或等于行的长度。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 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
);

此方法创建在指定的区域的标记。 如果要侦听标记事件缓冲,请将指针上对 pClient 参数的 IVsTextMarkerClient 接口。

备注

使用 IVsTextLines.CreateLineMarker 创建的标记是 (可沿的标记。使用 CreateStreamMarker 创建面向流的标记。

.NET Framework 安全性

请参阅

参考

IVsTextLines 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间