IEnumSTATDATA
The IEnumSTATDATA
interface is used to enumerate through an array of STATDATA
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:
In a data object, call CreateDataAdviseHolder
to get a pointer to the OLE data advise holder object, and then, to implement IDataObject::EnumDAdvise,
call IDataAdviseHolder::EnumAdvise, which creates the enumeration object
and supplies a pointer to the implementation of IEnumSTATDATA.
In a compound document object,
call CreateOLEAdviseHolder 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 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. IDataObject::EnumDAdvise
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)
See Also