From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand calls popup window (dll) -> must be integrated in operator interface as child window

Hi,
 
I use an operator interface written in CVI using the TestStand engine. A non-CVI window needs to be integrated into the OI via Windows SDK functions (SetParent etc.).
The non-CVI window comes from a dll called in a TestStand step.
 
When the sequence containing the dll step runs in the Sequence Editor everything is ok. But when the sequence is started directly in the OI the whole application freezes. I assume that there is a problem with the TS engine.
 
I attached the sequence file, the dll source and the OI source.
0 Kudos
Message 1 of 4
(2,906 Views)
hello steffen,

i compiled your code and it worked. the application didn't freeze.
which versions of CVI and TestStand do you use?
i used CVI 7.1.1 and TS 3.1

regards,

robert h
NI germany
0 Kudos
Message 2 of 4
(2,871 Views)

Hi Robert,

thanks for answering. I used the same versions like you, but also have tried everything with CVI 8.0 and TS 3.5. But without success.

Do you use Windows XP? My platform is Win2K, maybe that's the difference. Could you please try to click on the captions (Titelleisten...) of the TestExec window and the child window (message popup) alternately and move the windows around to force them to repaint? This causes freezing almost everytime in my case...

We've already installed a spy application to hook the window messages and there we can see that the last message before freezing is the WM_PAINT msg.

I attach a compiled version so you can try this out too.

Thanks in advance

Steffen

0 Kudos
Message 3 of 4
(2,869 Views)
hello steffen,

the problem you see results from a race condition between the operator interface thread and the pop-thread. each of the threads waits on the other and no messages are processed.

the only way to avoid this, is to make sure, that the call of the pop-up is within the same thread as the OI.
so the best way would be to call the pop-up within the OI.

lind regards,

robert h
0 Kudos
Message 4 of 4
(2,829 Views)