Redigera

Dela via


DataObject.IDataObject.DAdvise(FORMATETC, ADVF, IAdviseSink, Int32) Method

Definition

Creates a connection between a data object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data.

 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

Parameters

pFormatetc
FORMATETC

A FORMATETC structure, passed by reference, that defines the format, target device, aspect, and medium that will be used for future notifications.

advf
ADVF

One of the ADVF values that specifies a group of flags for controlling the advisory connection.

pAdvSink
IAdviseSink

A pointer to the IAdviseSink interface on the advisory sink that will receive the change notification.

pdwConnection
Int32

When this method returns, contains a pointer to a DWORD token that identifies this connection. You can use this token later to delete the advisory connection by passing it to DUnadvise(Int32). If this value is zero, the connection was not established. This parameter is passed uninitialized.

Returns

This method supports the standard return values E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY.

Implements

Attributes

Remarks

This member is an explicit interface member implementation. It can be used only when the DataObject instance is cast to an IDataObject interface.

Applies to