Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method creates an enumerator that can be used to enumerate the advisory connections established for an object and supplies a pointer to its IEnumSTATDATAinterface.
Syntax
HRESULT EnumAdvise( IENumSTATDATA* ppEnumAdvise ); |
Parameters
- ppEnumAdvise
-
[out] Address of IEnumSTATDATA* pointer variable that receives the interface pointer to the new enumerator.
A NULL value for * ppenumAdviseindicates that there are no advisory connections on the object, or that an error occurred.
The advise holder is responsible for incrementing the reference count on the IEnumSTATDATApointer this method supplies. It is the caller's responsibility to call IUnknown::Releasewhen it is done with the pointer.
Return Value
This method supports the standard return value E_FAIL, as well as the values described in the following table.
Value | Description |
---|---|
S_OK |
Enumerator created successfully. |
E_NOTIMPL |
EnumAdviseis not implemented. |
Remarks
EnumAdvisecreates an enumerator that can be used to enumerate an object's established advisory connections. The method supplies a pointer to the IEnumSTATDATAinterface on this enumerator.
Advisory connection information for each connection is stored in the STATDATAstructure, and the enumerator must be able to enumerate these structures, defined as follows.
Copy Code | |
---|---|
typedef struct tagSTATDATA { FORMATETC Formatetc; DWORD grfAdvf; IAdviseSink * pAdvise; DWORD dwConnection; }STATDATA; |
For this method, the only relevant structure members are pAdviseand 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.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | Oleidl.h, oleidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IOleAdviseHolderIEnumSTATDATA
IUnknown::Release
STATDATA