DataObject.IDataObject.DAdvise(FORMATETC, ADVF, IAdviseSink, Int32) 方法

定义

创建数据对象与公告接收器之间的连接。 此方法由支持公告接收器的对象调用,并使公告接收器能够收到对象数据更改的通知。

 virtual int System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise(System::Runtime::InteropServices::ComTypes::FORMATETC % pFormatetc, System::Runtime::InteropServices::ComTypes::ADVF advf, System::Runtime::InteropServices::ComTypes::IAdviseSink ^ pAdvSink, [Runtime::InteropServices::Out] int % pdwConnection) = System::Runtime::InteropServices::ComTypes::IDataObject::DAdvise;
[System.Security.SecurityCritical]
int IDataObject.DAdvise(ref System.Runtime.InteropServices.ComTypes.FORMATETC pFormatetc, System.Runtime.InteropServices.ComTypes.ADVF advf, System.Runtime.InteropServices.ComTypes.IAdviseSink pAdvSink, out int pdwConnection);
int IDataObject.DAdvise(ref System.Runtime.InteropServices.ComTypes.FORMATETC pFormatetc, System.Runtime.InteropServices.ComTypes.ADVF advf, System.Runtime.InteropServices.ComTypes.IAdviseSink pAdvSink, out int pdwConnection);
[<System.Security.SecurityCritical>]
abstract member System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise : FORMATETC * System.Runtime.InteropServices.ComTypes.ADVF * System.Runtime.InteropServices.ComTypes.IAdviseSink * int -> int
override this.System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise : FORMATETC * System.Runtime.InteropServices.ComTypes.ADVF * System.Runtime.InteropServices.ComTypes.IAdviseSink * int -> int
abstract member System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise : FORMATETC * System.Runtime.InteropServices.ComTypes.ADVF * System.Runtime.InteropServices.ComTypes.IAdviseSink * int -> int
override this.System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise : FORMATETC * System.Runtime.InteropServices.ComTypes.ADVF * System.Runtime.InteropServices.ComTypes.IAdviseSink * int -> int
Function DAdvise (ByRef pFormatetc As FORMATETC, advf As ADVF, pAdvSink As IAdviseSink, ByRef pdwConnection As Integer) As Integer Implements IDataObject.DAdvise

参数

pFormatetc
FORMATETC

FORMATETC通过引用传递的结构,用于定义将用于将来通知的格式、目标设备、方面和介质。

advf
ADVF

指定 ADVF 用于控制公告连接的标志组的值之一。

pAdvSink
IAdviseSink

指向 IAdviseSink 接收更改通知的通知接收器上的接口的指针。

pdwConnection
Int32

此方法返回时,包含指向标识此连接的 DWORD 令牌的指针。 稍后可以通过将通知连接传递给 DUnadvise(Int32)此令牌来删除通知连接。 如果此值为零,则未建立连接。 此参数未初始化传递。

返回

此方法支持标准返回值E_INVALIDARG、E_UNEXPECTED和E_OUTOFMEMORY。

实现

属性

注解

此成员是显式接口成员实现。 仅当实例强制转换为DataObject接口时IDataObject,才能使用它。

适用于