How to suppress Runtime Error Dialog Box

Dear Sir:

I like to suppress Runtime Error! Dialog box with title called Microsoft Visual C++ Runtime Library and message said "This application has requested the Runtime to terminate it in an unusual way, Please contact the application's support team for more information" Our software is compiled by VC6, I tried to use SetErrorMode window API function with different nMode "SEM_FAILCRITICALERRORS, SEM_NOALIGNMENTFAULTEXCEPT,
SEM_NOGPFAULTERRORBOX,
SEM_NOOPENFILEERRORBOX"

but no one works. Reason i want to suppress this dialogbox is that we don't want to close this dialog box by a human, whenever the application down scripts can start it automatically.

Thanks in advance
Last edited on
Just an idea. But you should FIX the runtime error instead of avoiding it. Thats very bad practice and there is really no excuse for allowing software to have a runtime error.

Thanks Zaita, In our case we can't duplicate Bug neither in lib nor customer site. also the software is running in client site everyday, we try to solve this problem but for the time being without any progress, so we try to find another way for working around, until fixing that problem.

thanks anyway
Even if that is the case. It's an intermittent runtime error caused by a particular sequence of events. This is of even more concern because now the application could be experiencing unexpected behavior (e.g. partial completion of transactions).

Your best bet is to run it with a debugger or profiler attached on the client's computer who is experiencing the problem and take the logs. I would also look at adding more exception handling (larger blocks) and putting stack trace information into the event-log.

Edit: Exception wrapping the entire execution code and swallowing the exception should also allow you to bypass the error box. Again, this is worst practice. You should use the exception handling to diagnose and fix the problem; not ignore it. Some software I certainly wouldn't purchase.
Last edited on
Good point Zaita:

I'll try to follow way you point out.

Thank you very much!
Topic archived. No new replies allowed.