This interface is used to enumerate through an array of STATDATA structures, which contain advisory connection information for a data object. IEnumSTATDATA has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone. For general information on these methods, refer to IEnumXXXX.
At a Glance
Header file: | Oaidl.h |
Windows CE versions: | 2.0 and later |
The IEnumSTATDATA interface is used to enumerate through an array of STATDATA structures, which contain advisory connection information for a data object. IEnumSTATDATA has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone.
When to Implement
IEnumSTATDATA is 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:
When to Use
Containers usually call methods that return a pointer to IEnumSTATDATA so 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::EnumDAdvise and IOleAdviseHolder::EnumAdvise methods both supply a pointer to IEnumSTATDATA.
The prototypes of the methods are as follows:
HRESULT Next(
ULONG celt,
STATDATA * rgelt,
ULONG * pceltFetched
);
HRESULT Skip(
ULONG celt
);
HRESULT Reset(void)
HRESULT Clone(
IEnumSTATDATA ** ppenum
);
Method | Description |
IEnumSTATDATA::Next | Retrieves a specified number of items in the enumeration sequence. |
IEnumSTATDATA::Skip | Skips over a specified number of items in the enumeration sequence. |
IEnumSTATDATA::Reset | Resets the enumeration sequence to the beginning. |
IEnumSTATDATA::Clone | Creates a copy of the current state of enumeration. |