Export (0) Print
Expand All

IMoniker::Enum method

Retrieves a pointer to an enumerator for the components of a composite moniker.

Syntax


HRESULT Enum(
  [in]   BOOL fForward,
  [out]  IEnumMoniker **ppenumMoniker
);

Parameters

fForward [in]

If TRUE, enumerates the monikers from left to right. If FALSE, enumerates from right to left.

ppenumMoniker [out]

A pointer to an IEnumMoniker pointer variable that receives the interface pointer to the enumerator object for the moniker. When successful, the implementation must call AddRef on the enumerator object. It is the caller's responsibility to call Release. If an error occurs or if the moniker has no enumerable components, the implementation sets *ppenumMoniker to NULL.

Return value

This method can return the standard return values E_OUTOFMEMORY, E_UNEXPECTED, and S_OK.

Remarks

This method must supply an IEnumMoniker pointer to an enumerator that can enumerate the components of a moniker. For example, the implementation of the IMoniker::Enum method for a generic composite moniker creates an enumerator that can determine the individual monikers that make up the composite, while the IMoniker::Enum method for a file moniker creates an enumerator that returns monikers representing each of the components in the path.

Notes to Callers

Call this method to examine the components that make up a composite moniker.

Notes to Implementers

If the new moniker class has no discernible internal structure, your implementation of this method can simply return S_OK and set ppenumMoniker to NULL.

Implementation-specific Notes

ImplementationNotes
Anti-monikerThis method returns S_OK and sets ppenumMoniker to NULL.
Class monikerThis method returns S_OK and sets ppenumMoniker to NULL.
File monikerThis method returns S_OK and sets ppenumMoniker to NULL.
Generic composite monikerIf successful, this method returns S_OK and passes back an enumerator that enumerates the component monikers that make up the composite; otherwise, the method returns E_OUTOFMEMORY.
Item monikerThis method returns S_OK and sets ppenumMoniker to NULL.
OBJREF monikerThis method returns S_OK and sets ppenumMoniker to NULL.
Pointer monikerThis method returns E_NOTIMPL.
URL monikerThis method returns S_OK and sets ppenumMoniker to NULL.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IMoniker is defined as 0000000f-0000-0000-C000-000000000046

See also

IEnumMoniker
IMoniker

 

 

Community Additions

ADD
Show:
© 2014 Microsoft