05-26-2016 05:18 PM
I've been having trouble getting LabView DLLs that use the One Button Dialog to function correctly when called from LabWindows/CVI.
I'm currently using LabView 2014 SP1 and LabWindows/CVI 2013 SP2.
For a simple test, I made the following VI into a DLL in LabView:
The basic concept being that you can optionally display a popup message of the result. (I did not include error handling to simplify the function.)
The DLL is created with the appropriate header file:
I then created a very simple executable in LabWindows/CVI to test the DLL:
If I run the code above going line by line in debug mode, I will get the right result for "C" before exiting. If I set the third parameter to "1" and run the code, I get the following popup and the program hangs indefinitely:
I have also noted that calling the DLL from a labview VI does not have this problem and the functionality is as would be expected.
Why does CVI have issues displaying the popup? Is it something to do with the temporary .exe that is being created?
Further, if I build a release executable and run, I get this:
The lvrt.dll file is in that directory, and I have been using 2014 for the development, so I have no idea what's going on here. Would a reinstall make any difference?
Thanks
05-26-2016 06:45 PM
I found a previous service request where the issue was explained as a threading conflict between the two UIs. It seemed to have been solved by calling the DLL in a separate thread.