Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Enumerates objects in the current container.

Syntax

HRESULT EnumObjects(
  DWORD 
grfFlags, 	//Value specifying what is to be enumerated
  IEnumUnknown 
**ppenum  //Address of output variable that receives the 
); 				 // IEnumUnknown interface pointer

Parameters

grfFlags

[in] Value that specifies which objects in a container are to be enumerated, as defined in the enumeration OLECONTF.

ppenum

[out] Address of IEnumUnknown* pointer variable that receives the interface pointer to the enumerator object. Each time a container receives a successful call to EnumObjects, it must increase the reference count on the * ppenumpointer the method returns. It is the caller's responsibility to call IUnknown::Releasewhen it is done with the pointer. If an error is returned, the implementation must set * ppenumto NULL.

Return Value

This method supports the standard return value E_FAIL, as well as the following:

Value Description

S_OK

Enumerator successfully returned.

E_NOTIMPL

Object enumeration not supported.

Remarks

A container should implement EnumObjectsto enable programmatic clients to find out what objects it holds. This method, however, is not called in standard linking scenarios.

Requirements

Header Oleidl.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also