9.5.5 OleEnumObjects

OLESTATUS OleEnumObjects(lhDoc, lplpObject)

LHCLIENTDOC lhDoc;

LPOLEOBJECT FAR * lplpObject;

The OleEnumObjects function enumerates the objects in a specified document.

Parameter Description

lhDoc Identifies the document for which the objects are enumerated.
lplpObject Points to an object in the document when the function returns. For the first call to this function, this parameter should point to a NULL object.

When an application specifies a NULL object for the lplpObject parameter, the OleEnumObjects function returns the first object in the document. Whenever an application specifies an object that was returned by a previous call to OleEnumObjects, the function returns the next object, in sequence. When there are no more objects in the document, the lplpObject parameter points to a NULL object. The objects that have been deleted are not enumerated by this function.

The return value is OLE_OK if successful; otherwise, it could be one of the following:

OLE_ERROR_HANDLE

OLE_ERROR_OBJECT

See AlsoOleDelete, OleRelease