Abort call to unmanaged DLL

Posted by phq on Stack Overflow See other posts from Stack Overflow or by phq
Published on 2010-05-06T13:29:57Z Indexed on 2010/05/06 14:08 UTC
Read the original article Hit count: 259

Filed under:
|
|
|
|

I have an unmanaged DLL with a function that can run for a long time if the input parameter is a large value, sometimes that is desirable but not always.

How can I in c# call this function so that I can abort it when needed?

So far I have tried to put the call in a separate thread, but neither interrupt nor abort seem to stop the process, which runs at 100% CPU until the dll is done.

Is it possible to terminate the running dll code?

© Stack Overflow or respective owner

Related posts about c#

Related posts about unmanaged