ShellExecute "open" on exception does not allow a force restart
Posted on 2008-06-19
I am writing a program which on an Unhandledexception, I want it to re-open itself again. For this I have created an exception filter:
long ProgExceptionFilter(EXCEPTION_POINTERS* p)
GetModuleFileName(NULL, acModule, MAX_PATH);
ShellExecute(NULL, _T("open"), acModule, NULL, NULL, SW_SHOW);
This works but the problem is that the "restart" I had scheduled for 00:00 every day using (shutdown -r -f) no longer works because it cannot force the application with the above code to close.
Do yo have any ideas to overcome this problem?
Thank you .