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