LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Concurrent calls to RunUserInterface followed by QuitUserInterface don't work

Hello everyone,
   I have CVI 7.1 on Win2k and Teststand 3.1.  I have a teststand sequence that calls a bunch of functions from a CVI DLL.  One of those functions programmatically creates a window with a picture in it and a quit button.  The window is launched by calling "RunUserInterface" and the quit button calls "QuitUserInterface".  There is a step in TS that calls the function that displays this window.  The first time I call that step everything works properly; after that if I try to run that step, the window will popup and then immediately disappear, because RunUserInterface is returning immediately instead of waiting for QuitUserInterface to be called.  Sometimes I can call the step twice and it will work properly, but not always.

Is there some sort of reset I need to call?  The DLL isn't being unloaded between calls of that step.
Thanks.
0 Kudos
Message 1 of 2
(2,846 Views)
Make sure that your quit button callback is calling QuitUserInterface ONLY when event == EVENT_COMMIT.  You may be getting a different event (focus, etc) that is causing your callback to call QuitUserInterface.

Mert A.
National Instruments
0 Kudos
Message 2 of 2
(2,841 Views)