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]若要透過建立標記的文字的長度。
pClient
類型:Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient[in]指標IVsTextMarkerClient介面。 實作這個介面,您要接收標記事件的告知 [宣布文字緩衝區。
ppMarker
類型:array<Microsoft.VisualStudio.TextManager.Interop.IVsTextStreamMarker[][] out指標IVsTextStreamMarker介面。 如果這個參數為nullnull 參考 (即 Visual Basic 中的 Nothing),那麼文字標記由文字緩衝區擁有。 例如,緩衝區所擁有的文字標記是暫時性的書籤。
傳回值
類型: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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。