If memory serves me right, this message box is part of the Jit-In-Time-Debugger architecture of Windows. On a development box, an exception like the dreaded access violation usually triggers the system's default debugger, giving you the well-known "do you want to debug this program? yes. no. cancel."-dialog box.
On a production box - or any box without a registered JIT debugger - you'll see the default "application crashed. OK." dialog which you have experienced. One possible workaround should therefore be to create a dummy windows executable (which just starts and immediately exists) and register this .exe as the system's JIT debugger. Please keep in mind though that this change will affect all applications running on the system and that you won't see *any* application crash information after this change. You can find more information on how to register a custom debugger for example at http://jrfonseca.dyndns.org/projects/gnu-win32/software/drmingw/#jit. (look for the heading "Editing the Registry" which describes the settings of the registry key \\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\) However: I've never tried this myself. Your mileage may vary. HTH, -Ingo Independent .NET and Web Services Consultant. Microsoft Regional Director - Austria. Author of "Advanced .NET Remoting". http://www.ingorammer.com Subscribe to Ingo Rammer's Architecture Briefings at http://www.ingorammer.com/NL -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Alex Ben-Ari Sent: Wednesday, January 07, 2004 2:11 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Catching access violations Hello all. The following is most troubling for me and I cannot get rid of it. Thought perhaps someone could help (hope this is not too unadvanced): I have a c# app. During its execution it needs to run a 3rd party executable. It does this through Process.Start and then Process.WaitForExit. The problem is that occasionally this 3rd party exe will crash with an "access violation" message box. This then requires pressing OK before my app Can continue running. This is a major problem, of course, since I need it to run for long periods of time without user intervention being required. How can I catch this violation condition, ignore it and just let the 3rd party exe die and continue with my own flow of execution ? Is there any way to do this ? Thanks to anyone who can help me on this, Alex. =================================== This list is hosted by DevelopMentor. http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com