共用方式為


ClipboardObject.IDataObject.DAdvise Method

Definition

Creates a connection between the clipboard 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 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);
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

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
UInt32

A value from the ADVF enumeration that specifies a group of flags for controlling the advisory connection.

pAdvSink
IAdviseSink

An IAdviseSink object pointing to the advisory sink that will receive the change notification.

pdwConnection
UInt32

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

Returns

S_OK if the advisory connection was created, E_NOTIMPL if the clipboard object does not wrap an existing IDataObject object (from the Microsoft.VisualStudio.OLE.Interop namespace), or an error code.

Implements

Applies to