OleDataObject.IDataObject.DAdvise Method

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.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

  • pFormatetc
    Type: array<Microsoft.VisualStudio.OLE.Interop.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.

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

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

Return Value

Type: System.Int32
If the method succeeded, S_OK, otherwise an error code.

Implements

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

.NET Framework Security

See Also

Reference

OleDataObject Class

Microsoft.VisualStudio.Shell Namespace