Creates an enumerator that can be used to enumerate the advisory connections currently established for an object, and supplies a pointer to its IEnumSTATDATA interface.
HRESULT EnumAdvise(
IEnumSTATDATA ** ppenumAdvise //Address of output variable that
// receives the IEnumSTATDATA
// interface pointer
);
This method supports the standard return value E_FAIL, as well as the following:
IOleAdviseHolder::EnumAdvise creates an enumerator that can be used to enumerate an object's established advisory connections. The method supplies a pointer to the IEnumSTATDATA interface on this enumerator. Advisory connection information for each connection is stored in the STATDATA structure, and the enumerator must be able to enumerate these structures, defined as follows:
typedef struct tagSTATDATA {
FORMATETC Formatetc;
DWORD grfAdvf;
IAdviseSink * pAdvise;
DWORD dwConnection;
}STATDATA;
For this method, the only relevant structure members are pAdvise and dwConnection. Other members contain data advisory information. When you call the enumeration methods, and while an enumeration is in progress, the effect of registering or revoking advisory connections on what is to be enumerated is undefined.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oleidl.h.
IOleAdviseHolder::Advise, IOleAdviseHolder::UnAdvise, IOleObject::EnumAdvise, IDataAdviseHolder::EnumAdvise, STATDATA structure