Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IOleObject::EnumAdvise

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This method retrieves a pointer to an enumerator that can be used to enumerate the advisory connections registered for an object, so a container knows what to release prior to closing down.


HRESULT IEnumSTATDATA( 
  IEnumSTATDATA** ppenumAdvise
);
ppenumAdvise

[out] Address of IEnumSTATDATA* pointer variable that receives the interface pointer to the new enumerator.

A NULL value for *ppenumAdvise indicates 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 IEnumSTATDATA pointer this method supplies. The caller is responsible to call IUnknown::Release when it is done with the pointer.

This method supports the standard return value E_FAIL, as well as the values described in the following table.

Value Description

S_OK

The enumerator is created.

E_NOTIMPL

EnumAdvise is not implemented.

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.

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

HeaderOleidl.h, oleidl.idl
Libraryoleaut32.lib, uuid.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.