Search code examples
c++winapiwindows-7windows-kernel

What is the best way of detecting process crash using C++


Is there any way to detect process crash in windows 7 ? Just to clarify, upon every process crash windows creates the WERfault.exe ( windows error reporting) . I have driver which monitors the system by using the existing kernel callback mechanism of the kernel. The callback notifies my driver when a certain process event happens (using PsSetCreateProcessNotifyRoutine). The problem is I see that WERfault.exe created by svchost.exe but I can't find a way resolving which process has crashed.


Solution

  • Setup your application as the automatic debugger. This can then pass the event on the the real WER if you want to provide the usual UI.