创建特定类型的流标记在指定范围的。
命名空间: 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
);
此方法创建在指定的区域的标记。 如果要侦听标记事件缓冲,请将指针上对 pClient 参数的 IVsTextMarkerClient 接口。
备注
使用 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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。