Releasing OLE and Objects
To release OLE and the exposed objects, use the following functions:
RevokeActiveObject — Ends an object's status as the active object.
CoRevokeClassObject — Informs OLE that a class factory is no longer available for use by other applications.
OLEUninitialize — Releases OLE.
For more information on OleUninitialize and CoRevokeClassObject, see the COM Programmers Reference.