Index   Commented   Search   About

IEnumMoniker

The IEnumMoniker interface is used to enumerate the components of a moniker or to enumerate the monikers in a table of monikers.

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

Use 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 return an IEnumMoniker interface pointer:

  • The IMoniker::Enum method returns an IEnumMoniker implementation that can enumerate forwards or backwards through the components of the moniker. For a description of how two of the system-supplied types of monikers enumerate their components, see IMoniker pics/OLE00090001.gif File Moniker Implementation and IMoniker pics/OLE00090001.gif Generic Composite Moniker Implementation.

  • The IRunningObjectTable::EnumRunning method returns an IEnumMoniker implementation that can enumerate the monikers registered in a Running Object Table.

The prototypes of the member functions are as follows:

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

HRESULT Skip(ULONG celt)

HRESULT Reset(void)

HRESULT Clone(IEnumMoniker ** ppenum)

See Also

IEnumXXXX, IMoniker::Enum, IRunningObjectTable::EnumRunning

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun