STDMETHODIMP CHelloService::ConnectSlot(VARIANT aSubscriber) { connect(aSubscriber); //connect(boost::bind(aSubscriber)); return S_OK; }
CHelloService::connection_t CHelloService::connect(signal_t::slot_function_type subscriber) { return m_sig.connect(subscriber); }
How would you make singal slot out of "VARIANT aSubscriber" (which probably wraps some IDispatch* pointing to the stub that communicates with the proxy residing in the Client appartment) ? What boost::signal does after is just a call of a function/functor provided by the subscriber. Certainly, you can't call this way any client code from within the server. In the COM environment callbacks are usually implemented as so-called "connection points", and that's what you need: http://msdn.microsoft.com/en-us/library/h7kad5hw(VS.80).aspx