IVsLanguageClipboardOps.TextFromData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Render this data object to text.
public:
int TextFromData(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pTextLayer, Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDO, cli::array <Microsoft::VisualStudio::TextManager::Interop::LTE_TEXTDATAFLAGS> ^ ptdfFlags, [Runtime::InteropServices::Out] System::String ^ % pbstrText);
int TextFromData(Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer const & pTextLayer, Microsoft::VisualStudio::OLE::Interop::IDataObject const & pDO, std::Array <Microsoft::VisualStudio::TextManager::Interop::LTE_TEXTDATAFLAGS> const & ptdfFlags, [Runtime::InteropServices::Out] std::wstring const & & pbstrText);
public int TextFromData (Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer pTextLayer, Microsoft.VisualStudio.OLE.Interop.IDataObject pDO, Microsoft.VisualStudio.TextManager.Interop.LTE_TEXTDATAFLAGS[] ptdfFlags, out string pbstrText);
abstract member TextFromData : Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer * Microsoft.VisualStudio.OLE.Interop.IDataObject * Microsoft.VisualStudio.TextManager.Interop.LTE_TEXTDATAFLAGS[] * string -> int
Public Function TextFromData (pTextLayer As IVsTextLayer, pDO As IDataObject, ptdfFlags As LTE_TEXTDATAFLAGS(), ByRef pbstrText As String) As Integer
Parameters
- pTextLayer
- IVsTextLayer
[in] Pointer to a text layer object for the referenced data object.
- pDO
- IDataObject
[in] Pointer to the data object.
- ptdfFlags
- LTE_TEXTDATAFLAGS[]
[out] Specifies options for how text is being pasted. For more information, see LTE_TEXTDATAFLAGS .
- pbstrText
- String
[out] Text of the data object.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsLanguageClipboardOps::TextFromData(
[in] IVsTextLayer *pTextLayer,
[in] IDataObject *pDO,
[out] LTE_TEXTDATAFLAGS *ptdfFlags,
[out, retval] BSTR *pbstrText
);
If you return S_OK to IsTextData , then the environment calls TextFromData
to prompt you to return the text of the data object.