IVsLanguageClipboardOps.GetDataObject 方法

使用语言特定的格式创建 IDataObject

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
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

参数

  • ppDO
    类型:IDataObject%

    [out] 数据对象。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 textmgr.idl:

HRESULT IVsLanguageClipboardOps::GetDataObject(
   [in] IVsTextView *pView, 
   [in] IVsTextLayer *pTextLayer, 
   [out, retval] IDataObject **ppDO
);

创建的数据对象不能存放对视图 (pView) 或文本层 (pTextLayer),因为数据对象可以活动得比它们长。

.NET Framework 安全性

请参阅

参考

IVsLanguageClipboardOps 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间