This topic has not yet been rated - Rate this topic

IDataObject::EnumDAdvise method

Applies to: desktop apps only

Creates an object that can be used to enumerate the current advisory connections.

Syntax

HRESULT EnumDAdvise(
  [out]  IEnumSTATDATA **ppenumAdvise
);

Parameters

ppenumAdvise [out]

A pointer to an 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 value

This method returns S_OK if the enumerator object is successfully instantiated or there are no connections. Other possible values include the following.

Return codeDescription
E_OUTOFMEMORY

Insufficient memory is available for the operation.

OLE_E_ADVISENOTSUPPORTED

Advisory notifications are not supported by this object.

 

Remarks

The enumerator object created by this method implements the IEnumSTATDATA interface. 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.

Notes to Callers

It is recommended that you use the OLE data advise holder object to handle advisory connections. With the pointer obtained through a call to CreateDataAdviseHolder, implementing IDataObject::EnumDAdvise becomes a simple matter of delegating the call to IDataAdviseHolder::EnumAdvise. This creates the enumerator and supplies the pointer to the OLE implementation of IEnumSTATDATA. At that point, you can call its methods to enumerate the current advisory connections.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IDataObject is defined as 0000010e-0000-0000-C000-000000000046

See also

IDataAdviseHolder::EnumAdvise
IDataObject
IEnumSTATDATA

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ