IEnumUnknown  9O2RGD

This enumerator enumerates objects with the IUnknown1NEM0LU interface. It can be used to enumerate through the objects in a component containing multiple objects. IEnumUnknown has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone. For general information on these methods, refer to IEnumXXXX1_733H2.

When to Implement

You can implement this whenever you want a caller to be able to enumerate the objects contained in another object. You get a pointer to IEnumUnknown through a call to IOleContainer::EnumObjects.

When to Implement

Call the methods of IEnumUnknown to enumerate the objects in a compound document, when you get a pointer to the interface on the enumerator through a call to IOleContainer::EnumObjects.

The prototypes of the methods are as follows:

HRESULT Next(ULONG celt, IUnknown ** rgelt, ULONG * pceltFetched)

HRESULT Skip(ULONG celt)

HRESULT Reset(void)

HRESULT Clone(IEnumUnknown ** ppenum)

See Also

IOleContainer