I'm using one .EXE program written on C# (bought it from one company).
Sometimes I need to close it (from outside, not manually - I use my small C# program that does Process.Kill instead when needed)
If the program is not doing anything - I can kill it easily.
But if it's doing some "work" (I think it's either "timer", or "backgroundworker" in their code) - it closes, but gives a small popup saying "Fatal Error" (and the "Ok" button). I click "Ok" and then it gives a bigger popup saying this:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at
System.Windows.Forms.UnsafeNetiveMethods.DispatchMessageA(MSG&msg)
at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UNsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(in t32 dbComponentID, Int32 Reason, Int32 pv LoopData)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason ApplicationContext context)
at
System.Windows.Forms.Applicaion.ThreadContext.RunMessageLoop(Int32reason, ApplicationContext context_
at System.Windows.Forms.Application.Run(Form mainForm)
at cawf.xad70bf2c5a1a269d.xef498c90a0302180()
(CAWF is the name of their process that I just killed).
After I click Ok here - I have to kill it again and only then it dies.
Their support says it's Windows error so there's nothing they can do.
My guess is that it's their backgroundworker that doesn't want to die when interrupted in the middle of something.
Is there any possible way to kill it "good way" (so that it does not give these errors)?