06-25-2022 10:44 AM
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?
Solved! Go to Solution.
06-27-2022 01:05 AM
any information from the return value?
status = RunUserInterface ();
you could verify that RunUserInterface returns because of QuitUserInterface by passing a return code to QuitUserInterface (int returnCode);
06-27-2022 08:14 AM
I figured out what the issue was. The call to QuitUserInterface in one of my callback functions was placed in such a way that it never executed. Silly mistake.