Share via


ClipboardObject.IDataObject.DAdvise Method

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.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
Private Function DAdvise ( _
    pFormatetc As FORMATETC(), _
    ADVF As UInteger, _
    pAdvSink As IAdviseSink, _
    <OutAttribute> ByRef pdwConnection As UInteger _
) As Integer Implements IDataObject.DAdvise
int IDataObject.DAdvise(
    FORMATETC[] pFormatetc,
    uint ADVF,
    IAdviseSink pAdvSink,
    out uint pdwConnection
)
private:
virtual int DAdvise(
    array<FORMATETC>^ pFormatetc, 
    unsigned int ADVF, 
    IAdviseSink^ pAdvSink, 
    [OutAttribute] unsigned int% pdwConnection
) sealed = IDataObject::DAdvise
private abstract DAdvise : 
        pFormatetc:FORMATETC[] * 
        ADVF:uint32 * 
        pAdvSink:IAdviseSink * 
        pdwConnection:uint32 byref -> int  
private override DAdvise : 
        pFormatetc:FORMATETC[] * 
        ADVF:uint32 * 
        pAdvSink:IAdviseSink * 
        pdwConnection:uint32 byref -> int
JScript does not support explicit interface implementations.

Parameters

  • ADVF
    Type: System.UInt32

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

  • pdwConnection
    Type: System.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. If this value is zero, the connection was not established. This parameter is passed uninitialized.

Return Value

Type: System.Int32
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

IDataObject.DAdvise(array<FORMATETC[], UInt32, IAdviseSink, UInt32%)

Remarks

If the clipboard object wraps an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), this method delegates the call to the corresponding DAdvise from that namespace. Otherwise, it returns the E_NOTIMPL error.

.NET Framework Security

See Also

Reference

ClipboardObject Class

Microsoft.VisualStudio.Data.Framework Namespace