IVsTextImage.GetTextBSTR(TextSpan[], String) 方法

定义

以 BSTR 形式返回文本跨度的文本

public:
 int GetTextBSTR(cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts, [Runtime::InteropServices::Out] System::String ^ % pbstrText);
int GetTextBSTR(std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pts, [Runtime::InteropServices::Out] std::wstring const & & pbstrText);
public int GetTextBSTR (Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pts, out string pbstrText);
abstract member GetTextBSTR : Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * string -> int
Public Function GetTextBSTR (pts As TextSpan(), ByRef pbstrText As String) As Integer

参数

pts
TextSpan[]

中指向结构的指针 TextSpan

pbstrText
String

弄指向包含文本的 BSTR 的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr:

HRESULT IVsTextImage::GetTextBSTR(  
   [in] const TextSpan * pts,  
   [out, retval] BSTR * pbstrText  
);  

适用于