IVsLanguageClipboardOps.GetDataObject Method

Definition

Creates an IDataObject with language-specific formats.

public:
 int GetDataObject(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pView, Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pTextLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject ^ % ppDO);
public:
 int GetDataObject(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pView, Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ pTextLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject ^ &  ppDO);
int GetDataObject(Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & pView, Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer const & pTextLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject const & & ppDO);
public int GetDataObject (Microsoft.VisualStudio.TextManager.Interop.IVsTextView pView, Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer pTextLayer, out Microsoft.VisualStudio.OLE.Interop.IDataObject ppDO);
abstract member GetDataObject : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer * IDataObject -> int
Public Function GetDataObject (pView As IVsTextView, pTextLayer As IVsTextLayer, ByRef ppDO As IDataObject) As Integer

Parameters

pView
IVsTextView

[In] The view containing the data object.

pTextLayer
IVsTextLayer

[In] The text layer containing the data object.

ppDO
IDataObject

[out] 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::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.

Applies to