• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 346
  • Last Modified:

ATL COM project, function call timeout.

I have created an ATL COM service (including MFC), free threaded. It seems to work perfectly, unless a call from a client takes a few seconds too long. In that case a dialog pops up that tells me that the server is not responding within the time limit and asks if I want to retry. Because the delay is expected I want to be able to change the timeout before the dialog pops up, and/or be able to catch the timeout myself programatically. Is this possible?

Thanks in advance.
0
stefanr
Asked:
stefanr
1 Solution
 
jumpjamCommented:
We had a similar problem with the "Switch To..." error and contacted Microsoft.  You cannot catch that error. You can however deal with the problem on the server side.  Rather than performing your operations in the function that handles the COM call you can simply package up any information sent to you by the Client and post a message to a window in your server.  This allows you to pass control back to the client right away.  Your server can then process the information off line and then notify the client when the processing has been completed (if that is needed).
0
 
stefanrAuthor Commented:
OK,then I have to make the function call delay on the client side. Not the clean solution I looked for, however.

Thanks!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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