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 interface is used to enumerate through an array of STATDATAstructures, which contain advisory connection information for a data object.
IEnumSTATDATAhas the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone.
For general information on these methods, see IEnum XXXX .
When to Implement
IEnumSTATDATAis implemented to enumerate advisory connections. Most applications will not implement this directly, but will use the OLE-provided implementation. Pointers to this implementation are available in two ways:
- In a data object, call the
CreateDataAdviseHolderfunction to get a pointer to the OLE
data advise holder object, and then, to implement the
IDataObject::EnumDAdvisemethod, call
IDataAdviseHolder::EnumAdvise, which creates the enumeration
object and supplies a pointer to the implementation of
IEnumSTATDATA.
- In a compound document object, call the
CreateOleAdviseHolderfunction to get a pointer to the OLE
advise holder object, and then, to implement
IOleObject::EnumAdvise, call
IOleAdviseHolder::EnumAdvise, which creates the enumeration
object and supplies a pointer to the implementation of
IEnumSTATDATA.
When to Use
Containers usually call methods that return a pointer to IEnumSTATDATAso the container can use its methods to enumerate the existing advisory connections, and use this information to instruct an object to release each of its advisory connections prior to closing down. The IDataObject::EnumDAdviseand IOleAdviseHolder::EnumAdvisemethods both supply a pointer to IEnumSTATDATA.
The prototypes of the methods are as follows.
Copy Code | |
---|---|
HRESULT Next( ULONG celt, STATDATA * rgelt, ULONG * pceltFetched ); HRESULT Skip( ULONG celt ); HRESULT Reset(void) HRESULT Clone( IEnumSTATDATA ** ppenum ); |
Methods
The following table shows the methods for this interface in alphabetical order.
Method | Description |
---|---|
Creates a copy of the current state of enumeration. |
|
Retrieves a specified number of items in the enumeration sequence. |
|
Resets the enumeration sequence to the beginning. |
|
Skips over a specified number of items in the enumeration sequence. |
Remarks
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | objidl.h, objidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IEnumSTATDATA::CloneIEnumSTATDATA::Reset
IEnumSTATDATA::Skip
IOleAdviseHolder::EnumAdvise