This is somewhat related to this thread, but a different question.
If I P/Invoke into unmanaged code and it gets hung, how can I kill the thread? This will obviously need to happen from a different thread. However, Thread.Abort does not work because the documentation states that the thread will only throw the ThreadAbortException once it returns from unmanaged code.
So far the only way that I found to kill a hung thread is to kill the whole process via Process.Kill. But that is way overkill for what I want, and I am hoping there is a better way that allows me to kill just the thread itself.
Any ideas?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.