共用方式為


IVsTextStream.CreateStreamMarker 方法

建立資料流標記給定型別的透過指定的區域。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
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

參數

  • iMarkerType
    類型:Int32

    [in]若要建立的資料標記的型別。

  • iPos
    類型:Int32

    [in]文字緩衝區中的起始位置。

  • iLength
    類型:Int32

    [in]若要透過建立標記的文字的長度。

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsTextStream::CreateStreamMarker(
   [in] long iMarkerType,
   [in] long iPos,
   [in] long iLength,
   [in] IVsTextMarkerClient *pClient,
   [out] IVsTextStreamMarker **ppMarker
);

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

注意事項注意事項

使用所建立的標記CreateStreamMarker是串流導向的資料標記。使用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[])來建立導向式的標記。

.NET Framework 安全性

請參閱

參考

IVsTextStream 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間