I create a child with CreateProcess and wait for it to finish. This process is very likely to crash. Is it possible to prevent the “%PROGRAMNAME% stopped working” dialog for the child?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is the child your own code (ie, is source available which you can modify)? If it is, you can catch unhandled exceptions and exit – use the SetUnhandledExceptionFilter function.
If it isn’t, then you could attach to the process as a debugger (CreateFile with DEBUG_ONLY_THIS_PROCESS) and run a simple event loop (see MSDN on topic).
I seem to recall there’s a system-wide registry key to disable the default SEH dialog, but I can’t find it, so I could be mistaken. Would this be too coarse for your situation?