Release a dispatch or COM object when done.
retcode = %CoRelease(Param1, Param2)
Param1 [in] | Dispatch object to be released. |
Param2 [in] | Boolean: FALSE to release just the dispatch object passed-in, TRUE to release the COM object to which this dispatch object belongs. |
A Boolean (Success or Fail)
Call CoGetException to get an error description.
If releasing a dispatch object, the IDispatch of this object is released and the object is removed from the cache.
If releasing a COM object:
After release, all variants that have been associated with this COM object are released.
After release, all IDispatch that have been associate with this COM object are released.
After release, all method names that have been associated with this COM object and its associated IDs (DISPIDs) are released.
Clean up whatever you have put in cache.