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 語彙基元 (Token) 的指標。 您可以在稍後將這個語彙基元傳遞到 DUnadvise(Int32),以便用它來刪除諮詢連接。 如果這個值是零,就不會建立連接。 這個參數會以未初始化的狀態傳遞。

傳回

Int32

這個方法支援標準傳回值E_INVALIDARG、E_UNEXPECTED和E_OUTOFMEMORY。

實作

屬性

備註

這個成員是明確介面成員實作, 只有在 DataObject 執行個體轉換成 IDataObject 介面時,才能使用這個成員。

適用於