9.4.10 OleDelete

OLESTATUS OleDelete(lpObject)

LPOLEOBJECT lpObject;

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

Parameter Description

lpObject Points to the object to delete.

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.

The return value is OLE_OK if successful; otherwise, it could be one of the following:

OLE_BUSY

OLE_ERROR_OBJECT

OLE_WAIT_FOR_RELEASE

See AlsoOleClose, OleRelease