IVsLanguageClipboardOps::GetDataObject Method (IVsTextView^, IVsTextLayer^, IDataObject^)

 

Creates an IDataObject with language-specific formats.

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

int GetDataObject(
	IVsTextView^ pView,
	IVsTextLayer^ pTextLayer,
	[OutAttribute] IDataObject^% ppDO
)

Parameters

pView
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

[In] The view containing the data object.

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

[In] The text layer containing the data object.

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

[out] 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::GetDataObject(
   [in] IVsTextView *pView, 
   [in] IVsTextLayer *pTextLayer, 
   [out, retval] IDataObject **ppDO
);

The data object created must not hold a reference to the view (pView) or the text layer (pTextLayer) because the data object can outlive them.

Return to top
Show: