Closes a COM/OLE Automation object
ObjectClose(objecthandle)
(i) objecthandle handle of object to close.
(i) @TRUE (always)
ObjectClose is now obsolete. When WIL processing for an object is complete, set the object variable to a null string to free WIL processor memory.
objVar = ""
The ObjectClose function closes an object and frees WIL processor memory. The parameter passed to ObjectClose must be the same variable that the return value from the corresponding ObjectOpen was placed into. Otherwise the function will fail.
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)