IVsLanguageClipboardOps::TextFromData Method (IVsTextLayer^, IDataObject^, array<LTE_TEXTDATAFLAGS>^, String^)

 

Render this data object to text.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

int TextFromData(
	IVsTextLayer^ pTextLayer,
	IDataObject^ pDO,
	array<LTE_TEXTDATAFLAGS>^ ptdfFlags,
	[OutAttribute] String^% pbstrText
)

Parameters

pTextLayer
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextLayer^

[in] Pointer to a text layer object for the referenced data object.

pDO
Type: Microsoft.VisualStudio.OLE.Interop::IDataObject^

[in] Pointer to the data object.

ptdfFlags
Type: array<Microsoft.VisualStudio.TextManager.Interop::LTE_TEXTDATAFLAGS>^

[out] Specifies options for how text is being pasted. For more information, see LTE_TEXTDATAFLAGS .

pbstrText
Type: System::String^

[out] Text of the data object.

Return Value

Type: System::Int32

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

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.

Return to top
Show: