If unmanaged code crashes your process, you're out of luck. There is no exception propagated to managed code. The only way to be stable against such a crash is to start the unmanaged code in a wholy separate process, not just a thread. You can than use inter-process communication to exchange data as needed, and restart the process if it crashes.
Also, Thread.Abort
is not only a bad practice - it also will not help you at all while the thread is inside the unmanaged code, such as when the unmanaged code "hangs". Thread.Abort
will only be allowed to abort the thread as it exits back to managed code.