IMoniker::Enum

HRESULT IMoniker::Enum(fForward, ppenmMoniker)

Enumerate the monikers of which the receiver is logically a composite. On a generic composite, this enumerates the pieces of which the composite is composed. On other monikers, the semantics of the pieces of which it is a composite are implementation-defined. For example, enumerating the pieces of a File Moniker might pick apart the internally stored path name into its components, even though they are not stored internally as actual separate monikers. Many monikers have no discernible internal structure; they will simply pass back NULL instead of an enumerator.

IEnumMoniker is an enumerator that supports the enumeration of items which are monikers. It is defined as:


typedef Enum<IMoniker*> IEnumMoniker;

which is shorthand for


interface IEnumMoniker : IUnknown { 
    virtual    HRESULT    Next(ULONG celt, IMoniker* rgelt[], ULONG* pceltFetched);
    virtual    HRESULT    Skip(ULONG celt);
    virtual    HRESULT    Reset();
    virtual    HRESULT    Clone(IEnumMoniker** ppenm);
    };

Argument

Type

Description

fForward

BOOL

If true, then the enumeration should be done in the normal order. If false, then the order should be the reverse of the order enumerated by the normal order.

ppenmMoniker

IEnumMonike**

On exit, the returned enumerator. May be NULL, signifying that there is nothing to enumerate.

return value

HRESULT

S_OK.