ObjectCollectionClose

Ends enumeration of a COM/OLE collection object.

Syntax:

ObjectCollectionClose( enumeration-handle)

Parameters:

(i) enumeration-handle an enumeration handle returned by ObjectCollectionOpen.

Returns:

(i) always 0 (zero).

 

ObjectCollectionClose is now obsolete. Use ForEach to enumerate through an object collection.

Example:


objFSO = ObjectOpen("Scripting.FilesystemObject")
objDrives = objFSO.Drives
hEnum = ObjectCollectionOpen(objDrives)
While 1
   objDrive = ObjectCollectionNext(hEnum)
   If objDrive == 0 Then Break
   Message("", objDrive.Path)
   ObjectClose(objDrive)
EndWhile
ObjectCollectionClose(hEnum)
ObjectClose(objDrives)
ObjectClose(objFSO)
See Also:

ObjectCollectionNext, ObjectCollectionOpen, COM/OLE, ObjectOpen, ForEach