OleRelease

3.1

  #include <ole.h>    

  OLESTATUS OleRelease(lpObject)    
  LPOLEOBJECT lpObject; /* address of 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

If the function is successful, the return value is OLE_OK. Otherwise, it is an error value, which may be one of the following:

OLE_BUSY
OLE_ERROR_OBJECT
OLE_WAIT_FOR_RELEASE

Comments

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

See Also

OleDelete