Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This interface is used to enumerate the components of a moniker or to enumerate the monikers in a table of monikers.
IEnumMoniker has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone.
When to Implement
You need to implement IEnumMoniker if you are writing a new type of moniker and your monikers have an internal structure that can be enumerated.
Your implementation of IMoniker::Enum must return an enumerator that implements IEnumMoniker and can enumerate your moniker's components. If your moniker has no structure that can be enumerated, your IMoniker::Enum method can simply return a NULL pointer.
When to Use
Call the methods of the IEnumMoniker interface if you need to enumerate the components of a composite moniker, or to enumerate the monikers in a table.
OLE defines two interfaces that supply an IEnumMoniker interface pointer:
- The IMoniker::Enum method gets a pointer to an IEnumMoniker implementation that can enumerate forwards or backwards through the components of the moniker.
- The IRunningObjectTable::EnumRunning method returns a pointer to an IEnumMoniker implementation that can enumerate the monikers registered in a Running Object Table.
The prototypes of the methods are as follows:
HRESULTNext(ULONGcelt,
IMoniker_com_IMoniker* rgelt,ULONG* pceltFetched);HRESULTSkip(ULONGcelt);HRESULTReset(void)HRESULTClone(IEnumMoniker** ppenum);
Methods in Vtable Order
IUnknown method | Description |
---|---|
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments reference count. |
Release | Decrements reference count. |
Method | Description |
---|---|
Next | Retrieves a specified number of items in the enumeration sequence. |
Skip | Skips over a specified number of items in the enumeration sequence. |
Reset | Resets the enumeration sequence to the beginning. |
Clone | Creates another enumerator that contains the same enumeration state as the current one. |
Remarks
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.
See Also
IMoniker::Enum | IRunningObjectTable::EnumRunning
Send Feedback on this topic to the authors