Continues enumeration of a COM/OLE collection object.
ObjectCollectionNext( enumeration-handle)
(i) enumeration-handle an enumeration handle returned by ObjectCollectionOpen.
(i) objecthandle COM/OLE object handle representing the next item in the collection, or 0 (zero) when finished enumerating the collection.
ObjectCollectionNext is now obsolete. Use ForEach to enumerate through an object collection.
Each time this function is called, it returns a COM/OLE object handle representing the next item in the collection. When enumeration is complete, it returns 0 (i.e., a NULL object handle).
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)
ObjectCollectionOpen, ObjectCollectionClose, COM/OLE, ObjectOpen, ForEach