avoiding error messageboxes
-
Hi. I have a faulty app that I should restart whenever it crashes. I can easily see when it's dead, since it creates a named mutex that disappear with the app. My problem is that if the app crashes and shows a MessageBox as this example: The instruction at "0x004015b0" referenced memory at "0x00000000". The memory could not be "written". Click on OK to terminate the program Click on CANCEL to debug the program Is there any way to avoid this? I can't modify the darned app's source code. thanks in advance, bye M.
-
Hi. I have a faulty app that I should restart whenever it crashes. I can easily see when it's dead, since it creates a named mutex that disappear with the app. My problem is that if the app crashes and shows a MessageBox as this example: The instruction at "0x004015b0" referenced memory at "0x00000000". The memory could not be "written". Click on OK to terminate the program Click on CANCEL to debug the program Is there any way to avoid this? I can't modify the darned app's source code. thanks in advance, bye M.
Run the process like it's being debugged (i.e. call CreateProcess with DEBUG_PROCESS), then handle the exception event in your debugger loop, and restart the program. It's really pretty easy to do and I point you to a simple example: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/writing_the_debugger_s_main_loop.asp[^] Chris Richardson
Terrain Software -
Run the process like it's being debugged (i.e. call CreateProcess with DEBUG_PROCESS), then handle the exception event in your debugger loop, and restart the program. It's really pretty easy to do and I point you to a simple example: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/writing_the_debugger_s_main_loop.asp[^] Chris Richardson
Terrain Software