See https://stackoverflow.com/questions/35828004/waitforsingleobject-for-thread-object-does-not-work-in-dll-unload
I have implemented a solution by creating a function within the myCaLab DLL which in turn ca_task_exit (or ca_context_destroy), and which called from the main application. This causes it to exit normally.
Is this a solution that meets your needs?
See https:/ /stackoverflow. com/questions/ 35828004/ waitforsingleob ject-for- thread- object- does-not- work-in- dll-unload
I have implemented a solution by creating a function within the myCaLab DLL which in turn ca_task_exit (or ca_context_ destroy) , and which called from the main application.
This causes it to exit normally.
Is this a solution that meets your needs?