返回文本范围中获取文本。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
Function GetText ( _
pts As TextSpan(), _
cch As Integer, _
<OutAttribute> psz As UShort() _
) As Integer
int GetText(
TextSpan[] pts,
int cch,
ushort[] psz
)
int GetText(
[InAttribute] array<TextSpan>^ pts,
[InAttribute] int cch,
[OutAttribute] array<unsigned short>^ psz
)
abstract GetText :
pts:TextSpan[] *
cch:int *
psz:uint16[] byref -> int
function GetText(
pts : TextSpan[],
cch : int,
psz : ushort[]
) : int
参数
pts
类型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[][in] 为 TextSpan 结构的指针。
cch
类型:Int32[in] 返回的字符数。
psz
类型:array<UInt16[][out] 为 null 指针已停止包含文本的字符串。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr.idl:
HRESULT IVsTextImage::GetText(
[in] const TextSpan * pts,
[in] LONG cch,
[out, size_is(cch)] LPOLESTR psz
);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。