Export (0) Print
Expand All

DataObject.IDataObject.DAdvise Method

Creates a connection between a data 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:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

int IDataObject.DAdvise(
	ref FORMATETC pFormatetc,
	ADVF advf,
	IAdviseSink pAdvSink,
	out int pdwConnection
)

Parameters

pFormatetc
Type: System.Runtime.InteropServices.ComTypes.FORMATETC

A FORMATETC structure, passed by reference, that defines the format, target device, aspect, and medium that will be used for future notifications.

advf
Type: System.Runtime.InteropServices.ComTypes.ADVF

One of the ADVF values that specifies a group of flags for controlling the advisory connection.

pAdvSink
Type: System.Runtime.InteropServices.ComTypes.IAdviseSink

A pointer to the IAdviseSink interface on the advisory sink that will receive the change notification.

pdwConnection
Type: System.Int32

When this method returns, contains a 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. This parameter is passed uninitialized.

Return Value

Type: System.Int32
This method supports the standard return values E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:

Implements

IDataObject.DAdvise(FORMATETC, ADVF, IAdviseSink, Int32)

This member is an explicit interface member implementation. It can be used only when the DataObject instance is cast to an IDataObject interface.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft