다음을 통해 공유


IVsTextView.GetSelectedText(String) Method

Definition

Returns a copy of the selected text.

public:
 int GetSelectedText([Runtime::InteropServices::Out] System::String ^ % pbstrText);
int GetSelectedText([Runtime::InteropServices::Out] std::wstring const & & pbstrText);
public int GetSelectedText (out string pbstrText);
abstract member GetSelectedText : string -> int
Public Function GetSelectedText (ByRef pbstrText As String) As Integer

Parameters

pbstrText
String

[out] If the method succeeds, specifies a pointer to a string containing the text.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextView::GetSelectedText(  
   [out] BSTR * pbstrText  
);  

Applies to