Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost:Signals and Bind question
From: Igor R (boost.lists_at_[hidden])
Date: 2009-02-11 08:21:11


>
> 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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net