[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10910
  • Last Modified:

Outgoing call cannot be made since the application is dispatching an input-synchronous call

Hey,

I have an out-of-process Active Exe that has a single-instance class that gets passed to several different applications so that they can communicate with through this "relay" component through use of custom events.

For example:

"A" and "B" are applications that are communicating through the relay component "R".  Meanwhile, there is a monitoring program "M" that resides in the system tray and monitors the relay component.

Normal operation, "M" begins and instantiates "R".  "A" and "B" are now start-up and get references to the singleton class within "R".  Now, both "A" and "B" can communicate through "R", raising events and responding to them with no problem.  The kicker is, that I wish to have the monitor ("M") raise an event through "R" and am getting the message "Outgoing call cannot be made since the application is dispatching an input-synchronous call"

Can anybody please explain what this message means?

If you can point me to a working solution, I will double the points for them.

Hopefully this question is in too much of a confusing format.  I will provide further details if necessary.
0
percosolator
Asked:
percosolator
1 Solution
 
Z_BeeblebroxCommented:
Hi,

I had the exact same problem. It is because you are subclassing your form to put the icon in the system tray. I suspect that the procedure you are calling in 'M' is user-initiated. I had the same problem when the user clicked on a menu item brought up when they right clicked on the systray icon. I could not call another DLL/EXE inside the menu click event. To get around this, I added a timer which I enabled in the menu click event, and then did the calling in the timer event. This seems to work well, although it is not very clean.

Zaphod.
0
 
percosolatorAuthor Commented:
That worked.   Thank you very much.

As you said, not elegent, but hey!  it works!
0
 
rqbanerjeeCommented:
I had to do the work in a different thread. It was too time consuming do develop the timer handler.

But it works great when the COM call is made from a separate thread.

Thanks for the suggestion.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now