Hello,
I am developing a DLL and recently tested a simple test case by calling one of the DLL functions from TestStand. The function is simple. It does the following:
Loads a particular panel from my UIR file (for entering SN, etc..) - LoadPanelEx
Displays that panel - DisplayPanel()
calls RunUserInterface() - to wait for callback function to fire
Now, I have a separate callback function that fires when someone selects the "OK" button on that panel. It does some data collection from the panel controls and then calls QuitUserInterface().
The bahaviour I'm seeing, is that RunUserInterface just immediately returns without waiting for the flag from QuitUserInterface which is in my callback function. According to the CVI documentation, RunUserInterface will wait until you call QuitUserInterface before returning. In my case, it just returns immediately and the panel just hangs there. TestStand just finishes executing because as far as it's concerned, the function it called in the DLL returned successfully.
Not sure what I'm doing wrong, any tips?