使用语言特定的格式创建 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
参数
pView
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextView[in] 包含数据对象的视图。
pTextLayer
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer[in] 包含数据对象的文本层。
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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。