OleRelease

  OLESTATUS OleRelease(lpObject)    
  LPOLEOBJECT lpObject; /* pointer to object to release */

The OleRelease function releases an object from memory and closes it if it was open. This function does not indicate that the object has been deleted from the client document.

Parameters

lpObject

Points to the object to release.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be OLE_BUSY, OLE_ERROR_OBJECT, or OLE_WAIT_FOR_RELEASE.

Comments

The OleRelease function should be called for all objects when closing the client document.

See Also

OleDelete