返回中指定的大小将 BSTR 的。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
Function GetLineText ( _
iStartLine As Integer, _
iStartIndex As Integer, _
iEndLine As Integer, _
iEndIndex As Integer, _
<OutAttribute> ByRef pbstrBuf As String _
) As Integer
int GetLineText(
int iStartLine,
int iStartIndex,
int iEndLine,
int iEndIndex,
out string pbstrBuf
)
int GetLineText(
[InAttribute] int iStartLine,
[InAttribute] int iStartIndex,
[InAttribute] int iEndLine,
[InAttribute] int iEndIndex,
[OutAttribute] String^% pbstrBuf
)
abstract GetLineText :
iStartLine:int *
iStartIndex:int *
iEndLine:int *
iEndIndex:int *
pbstrBuf:string byref -> int
function GetLineText(
iStartLine : int,
iStartIndex : int,
iEndLine : int,
iEndIndex : int,
pbstrBuf : String
) : int
参数
iStartLine
类型:Int32[in] 启动行。
iStartIndex
类型:Int32[in] 行中的起始字符的索引。 此值必须小于或等于行的长度。
iEndLine
类型:Int32[in] 结束行。
iEndIndex
类型:Int32[in] 在行内结束字符索引。 此值必须小于或等于行的长度。
pbstrBuf
类型:String%[out] 要插入的文本,因此,如果有的话)。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr.idl:
HRESULT IVsTextLines::GetLineText(
[in] long iStartLine,
[in] CharIndex iStartIndex,
[in] long iEndLine,
[in] CharIndex iEndIndex,
[out] BSTR * pbstrBuf
);
与调用方负责释放 BSTR。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。