The IEnumOleUndoUnits interface enumerates the undo units on the undo or redo stack.
The undo manager implements this method to enumerate a list of undo units on the undo or redo stack.
Use the IEnumOleUndoUnits interface to enumerate all the top level undo units on the undo or redo stack.
The prototypes of the methods are as follows:
HRESULT Next(
ULONG cUndoUnits, //[in]Number of undo units returned in rgpcd
CONNECTDATA **rgpcd,
//[out]Array to receive enumerated undo units
ULONG *pcFetched //[out]Pointer to actual number of undo units
);
HRESULT Skip(
ULONG cUndoUnits //[in]Number of undo units to skip
);
HRESULT Reset(void);
HRESULT Clone(
IEnumOleUndoUnits** ppEnum //[out]Address of output variable that
// receives the IEnumOleUndoUnits
// interface pointer
);
The caller is responsible for calling the Release method for each element in the array once this method returns successfully. If cUndoUnits is greater than one, the caller must also pass a non-NULL pointer to pcFetched to get the number of pointers it has to release.
E_NOTIMPL is not allowed as a return value. If an error value is returned, no entries in the rgpcd array are valid on exit and require no release.
There is no guarantee that the same set of elements will be enumerated on each pass through the list. It depends on the collection being enumerated. It is too expensive for some collections, such as files in a directory, to maintain a specific state.
The caller must release this new enumerator separately from the first enumerator.
Windows NT: Use version 4.0 or later. New for OC96.
Windows: Use Windows 95 or later. New for OC96.
Windows CE: Unsupported.
Header: Declared in ocidl.h.