This documentation is archived and is not being maintained.

IDataObject.DAdvise Method

Creates a notification connection between a data object implementing the IDataObject interface and a caller object, letting the caller receive notification of changes in the data for the data object.

Namespace:  Microsoft.Aspnet.Snapin
Assembly:  AspNetMMCExt (in AspNetMMCExt.dll)

int DAdvise(
	IntPtr a,
	int b,
	IntPtr c,
	ref int d


Type: System.IntPtr
A pointer to the FORMATETC defining the format, medium, and target device for notifications.
Type: System.Int32
A ADVF value specifying the requested behavior for the connection.
Type: System.IntPtr
A pointer to the IAdviseSink on the caller object.
Type: System.Int32%
A pointer to the connection set up by this call to the DAdvise method.

Return Value

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

Return value



The DAdvise method successfully created the connection.


The data object does not implement the DAdvise method.


lindex is not valid.


The data pointer value is not valid.


The object does not support change notification.

For more information about programming with the IDataObject interface and the Microsoft Management Console (MMC), see the "MMC Programmer's Guide" in the MSDN Library.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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