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
'Usage
Dim instance As ClipboardObject 
Dim pFormatetc As FORMATETC()
Dim ADVF As UInteger 
Dim pAdvSink As IAdviseSink 
Dim pdwConnection As UInteger 
Dim returnValue As Integer 

returnValue = CType(instance, IDataObject).DAdvise(pFormatetc, _
    ADVF, pAdvSink, pdwConnection)
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
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

ClipboardObject Members

Microsoft.VisualStudio.Data.Framework Namespace