OleDelete

  OLESTATUS OleDelete(lpObject)    
  LPOLEOBJECT lpObject; /* pointer to object to delete */

The OleDelete function deletes an object and frees memory that was associated with that object. If the object was open, it is closed.

Parameters

lpObject

Points to the object to delete.

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

An application uses the OleDelete function when the object is no longer part of the client document.

The OleDelete function, unlike OleRelease, indicates that the object has been permanently removed.

See Also

OleClose, OleCreate, OleRelease