共用方式為


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

這個方法會建立資料標記上的指定區域。 如果您想要接聽標記事件緩衝區,則傳遞給變數的指標,在IVsTextMarkerClient介面在pClient參數。

注意事項注意事項

使用所建立的標記IVsTextLines.CreateLineMarker會導向式的標記。使用CreateStreamMarker來建立資料流導向的資料標記。

.NET Framework 安全性

請參閱

參考

IVsTextLines 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間