FWIW, Google gleaned from this thread: 
<http://www.codeproject.com/Messages/2932857/Re-ATL-Add-In-and-MFC-DLL-communication-problem.aspx>

> This error is a COM related error. The description is this: "An
> outgoing call cannot be made since the application is dispatching
> an input-synchronous call."
>
> [...]
>
> However, I'm quite familiar with the error you've got. It means
> that you are making a call to a COM server that resides in
> another apartment and that COM server wants to call you back in
> the same call chain.
>
> This is not allowed since it would generate a deadlock. I suppose
> you've heard that COM threads always have to process messages, at
> least the ones that create COM objects.... The reason is that
> when you make a call from one apartment to another, the call will
> generate a message that is sent from the calling apartment (the
> proxy) to the called apartment (the stub). When the call has been
> processed a message is sent back that the calling apartment is
> waiting for. During that time the calling apartment is not
> available for incoming COM calls and thus the COM library
> generates an error if you're attempting to do it.
>
> This is the same problem you'll get if you're sending a message
> to another thread with ::SendMessage() instead of
> ::PostMessage(); if the receiving thread does not process
> messages you'll get a nice little deadlock.


Reply via email to