NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling CVI DLL (with child panels) from TestStand

When calling a CVI (v7.0) DLL from TestStand (v3.0) I am unable to load child panels from a parent panel. See the attached failure message.

Failure message says:
Error in call to LoadPanelEx.
Error code -129

This seems to imply that the parent and child panels are being created in different threads. This is not the case - I use only 1 thread throughout the CVI DLL.

Thanks,
Alan
0 Kudos
Message 1 of 2
(2,848 Views)
Alan -
You could validate that the thread ID's are the same by using the function CurrThreadId() in the Utility library.

For TestStand, the only way to guarentee that a child panel is loaded properly at a later time is if both the original parent panel and the child panel were loaded during a external call using a code module and they are in the same TestStand execution thread.

If you are loading panels in DLLMain, you cannot predict the threads that will load the panels. If you need to do this, then you must host your own internal worker thread to host the panel.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 2
(2,848 Views)