Share via


IVsLanguageClipboardOps.GetDataObject Method

Creates an IDataObject with language-specific formats.

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

Syntax

'Declaration
Function GetDataObject ( _
    pView As IVsTextView, _
    pTextLayer As IVsTextLayer, _
    <OutAttribute> ByRef ppDO As IDataObject _
) As Integer
int GetDataObject(
    IVsTextView pView,
    IVsTextLayer pTextLayer,
    out IDataObject ppDO
)
int GetDataObject(
    [InAttribute] IVsTextView^ pView, 
    [InAttribute] IVsTextLayer^ pTextLayer, 
    [OutAttribute] IDataObject^% ppDO
)
abstract GetDataObject : 
        pView:IVsTextView * 
        pTextLayer:IVsTextLayer * 
        ppDO:IDataObject byref -> int
function GetDataObject(
    pView : IVsTextView, 
    pTextLayer : IVsTextLayer, 
    ppDO : IDataObject
) : int

Parameters

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsLanguageClipboardOps Interface

Microsoft.VisualStudio.TextManager.Interop Namespace