Partager via


OleDataObject.IDataObject.DAdvise Method

Definition

Establishes a connection between the data object and a caller object implementing IAdviseSink.

 virtual int Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise(cli::array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> ^ pFormatetc, System::UInt32 ADVF, Microsoft::VisualStudio::OLE::Interop::IAdviseSink ^ pAdvSink, [Runtime::InteropServices::Out] System::UInt32 % pdwConnection) = Microsoft::VisualStudio::OLE::Interop::IDataObject::DAdvise;
 virtual int Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise(cli::array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> ^ pFormatetc, System::UInt32 advf, Microsoft::VisualStudio::OLE::Interop::IAdviseSink ^ pAdvSink, [Runtime::InteropServices::Out] System::UInt32 % pdwConnection) = Microsoft::VisualStudio::OLE::Interop::IDataObject::DAdvise;
int IDataObject.DAdvise (Microsoft.VisualStudio.OLE.Interop.FORMATETC[] pFormatetc, uint ADVF, Microsoft.VisualStudio.OLE.Interop.IAdviseSink pAdvSink, out uint pdwConnection);
int IDataObject.DAdvise (Microsoft.VisualStudio.OLE.Interop.FORMATETC[] pFormatetc, uint advf, Microsoft.VisualStudio.OLE.Interop.IAdviseSink pAdvSink, out uint pdwConnection);
abstract member Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * uint32 * Microsoft.VisualStudio.OLE.Interop.IAdviseSink * uint32 -> int
override this.Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * uint32 * Microsoft.VisualStudio.OLE.Interop.IAdviseSink * uint32 -> int
abstract member Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * uint32 * Microsoft.VisualStudio.OLE.Interop.IAdviseSink * uint32 -> int
override this.Microsoft.VisualStudio.OLE.Interop.IDataObject.DAdvise : Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * uint32 * Microsoft.VisualStudio.OLE.Interop.IAdviseSink * uint32 -> int
Function DAdvise (pFormatetc As FORMATETC(), ADVF As UInteger, pAdvSink As IAdviseSink, ByRef pdwConnection As UInteger) As Integer Implements IDataObject.DAdvise
Function DAdvise (pFormatetc As FORMATETC(), advf As UInteger, pAdvSink As IAdviseSink, ByRef pdwConnection As UInteger) As Integer Implements IDataObject.DAdvise

Parameters

pFormatetc
FORMATETC[]

Pointer to a FORMATETC structure that defines the format, target device, aspect, and medium that will be used for future notifications. For example, one sink may want to know only when the bitmap representation of the data in the data object changes. Another sink may be interested in only the metafile format of the same object. Each advise sink is notified when the data of interest changes. This data is passed back to the advise sink when notification occurs.

ADVFadvf
UInt32

DWORD that specifies a group of flags for controlling the advisory connection. Valid values are from the enumeration ADVF. However, only some of the possible ADVF values are relevant for this method.

pAdvSink
IAdviseSink

Pointer to the IAdviseSink interface on the advise sink that will receive the change notification.

pdwConnection
UInt32

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. If this value is zero, the connection was not established.

Returns

If the method succeeded, S_OK, otherwise an error code.

Implements

Applies to