I'm having some issues when using an implementation for callbacks from a third party C++ DLL with LabVIEW.
To solve the problem of not having callback functionalities compatible with C++ in LabVIEW, I create an intermediate DLL which posts user events to my LabVIEW code inside my C++ callback function. This is based on an example I found somewhere on the website, using the PostLVUserEvent in the C++ code.
The issue is that this involves a DLL call in a seperate thread inside my LabVIEW VI. I want to stop this thread once I press the Stop button of my VI. However, I do not seem to find a way to accomplish this. I do not have any means to communicate with the DLL after the function is called, since it is in essence just an infinite loop. I think I need some control/indicator inside my VI which I modify when Stop is pressed. I tried to just pass a control as a pointer inside the DLL when calling it first, but this does not seem to solve anything. I do not find any way to have some modifiable variable inside my VI which I can monitor from my C++ DLL.
I hope it's a little clear, and maybe someone has an idea which I overlooked. Now I always have to stop LabVIEW the hard way, killing the process.