Re: Passing interface derived from IDispatch as a parameter
Igor R. wrote:
It's a responsibility of IDispatch implementation of IMySender =
interface. QI should be called during performing of call of
"notify" method.
I'm not quite sure I got the idea.
IMySender is an *argument* passed to notify(), so how IDispatch
implementation of IMySender can handle it? Or did you mean that
IDispatch of the client sink must call QI
Yes, that's what Vi2 meant.
- but how can it know what QI it needs?
The same way it knows that, when IDispatch::Invoke is called with a =
particular DISPID, it should call onNotify method (which involves =
unpacking VARIANTs and pushing appropriate parameters onto the stack in =
the right order). For example, by reading the type library.
How do you implement the sink on the client side? Do you use ATL, MFC, =
something else? Could you show some code?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not =
necessarily a good idea. It is hard to be sure where they are going to =
land, and it could be dangerous sitting under them as they fly overhead. =
-- RFC 1925