I understand that creating a COM object that aggregates an existing COM object involves implementing the redirection logic in the IUnknown.QueryInterface method of the external object.
I have a question how to do this if the object you are building is being managed. On managed objects, IUnknown is clearly not implemented. COM Interop does it for you. So, how do I tell COM Interop that the object I'm building is an aggregation of another COM object?
So far, the only way to find all the interfaces of the internal object on the external and explicitly redirect them. This a) is ugly and b) assumes that you know all the interfaces to implement, which is not the case in my situation.
Any thoughts?
mfeingold
source share