IOleContainer::EnumObjects method
Enumerates the objects in the current container.
Syntax
HRESULT EnumObjects(
[in] DWORD grfFlags,
[out] IEnumUnknown **ppenum
);
Parameters
- grfFlags [in]
-
Specifies which objects in a container are to be enumerated, as defined in the enumeration OLECONTF.
- ppenum [out]
-
A pointer to an 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 ppenum pointer the method returns. It is the caller's responsibility to call IUnknown::Release when it is done with the pointer. If an error is returned, the implementation must set ppenum to NULL.
Return value
This method returns S_OK on success. Other possible return values include the following.
| Return code | Description |
|---|---|
|
The operation failed. |
|
Object enumeration not supported. |
Remarks
A container should implement EnumObjects to enable programmatic clients to find out what objects it holds. This method, however, is not called in standard linking scenarios.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IOleContainer is defined as 0000011b-0000-0000-C000-000000000046 |
See also