Compartilhar via


IDataObject::EnumDAdvise

This method creates an object that can be used to enumerate the current advisory connections.

HRESULT EnumDAdvise(
  IEnumSTATDATA** ppenumAdvise
);

Parameters

  • ppenumAdvise
    [out] Address of the IEnumSTATDATA* pointer variable that receives the interface pointer to the new enumerator object. If the implementation sets *ppenumAdvise to NULL, there are no connections to advise sinks at this time.

Return Values

This method supports the standard return value E_OUTOFMEMORY.

If the enumerator object is successfully instantiated or there are no connections, the method returns S_OK.

If the advisory notifications are not supported by this object, OLE_E_ADVISENOTSUPPORTED is returned.

Remarks

The enumerator object created by this method implements the IEnumSTATDATA interface, which is one of the standard enumerator interfaces that contain the Next, Reset,Clone, and Skip methods. IEnumSTATDATA permits the enumeration of the data stored in an array of STATDATA structures. Each of these structures provides information on a single advisory connection and includes FORMATETC and ADVF information, as well as the pointer to the advise sink and the token representing the connection.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Callers

After getting a pointer through this method, the data object can call the appropriate enumeration methods. While the enumeration is in progress, the effect of adding more advisory connections on the subsequent enumeration is undefined.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IEnumSTATDATA | ADVF | FORMATETC | STATDATA

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.