Edit

Share via


IDataObject.DAdvise(IntPtr, Int32, IntPtr, Int32) Method

Definition

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.

public:
 int DAdvise(IntPtr a, int b, IntPtr c, int % d);
public int DAdvise (IntPtr a, int b, IntPtr c, ref int d);
abstract member DAdvise : nativeint * int * nativeint * int -> int
Public Function DAdvise (a As IntPtr, b As Integer, c As IntPtr, ByRef d As Integer) As Integer

Parameters

a
IntPtr

nativeint

A pointer to the FORMATETC defining the format, medium, and target device for notifications.

b
Int32

An ADVF value specifying the requested behavior for the connection.

c
IntPtr

nativeint

A pointer to the IAdviseSink on the caller object.

d
Int32

A pointer to the connection set up by this call to the DAdvise method.

Returns

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

Return value Description
S_OK The DAdvise method successfully created the connection.
E_NOTIMPL The data object does not implement the DAdvise method.
DV_E_LINDEX lindex is not valid.
DV_E_FORMATETC The data pointer value is not valid.
OLE_E_ADVISENOTSUPPORTED The object does not support change notification.

Remarks

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

Applies to