Implement comobject by reference handling.