NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using CVI dialog boxes with C DLL flexable prototype adapter in Teststand

Hi,

I have been developing DLL's using CVI for use with GPIB instruments and NI PCI cards. I am at the moment trying to create a utility function within a DLL using a CVI dialog box, but have been having a few problems. The code compiles up ok but when I try to execute the code within Teststand I get the following error message, "The callback function, GraphicPopup, specified in the UIR file, is not a known function. If you are using an external compiler, you must include the UIR callbacks object or source code in the executable or DLL."
The GUI panel header is included in compile list so I don't understand why it doesn't recognise the function name.

Can anyone help?
----------------

Mr F
rancis Murphy
Edinburgh
Scotland
0 Kudos
Message 1 of 5
(2,862 Views)
When creating your DLL using CVI, you must declare your function, "GraphicPopup" as a DLLEXPORT in order for the UIR panel to locate it properly. Also make sure to your DLL resides in the ..\system32 directory on your system or in one of the TestStand search directories.

Please include your source code.
Message 2 of 5
(2,862 Views)
Todd,

thanks for your advice. I checked to see if I had covered your suggestions but still getting the same error message.
Sorry I forgot to include my source code last time, I have now attached CVI code.

thanks
-----------------
Francis Murphy
Edinburgh
Scotland
0 Kudos
Message 3 of 5
(2,862 Views)
Francis,

Try changing the function "LoadPanel" to the "LoadPanelEx" in your GraphicPopupBox function.

Original: if ((panelHandle = LoadPanel (0, "graphicpopup.uir", PANEL)) < 0)

Suggested: if ((panelHandle = LoadPanelEx (0, "graphicpopup.uir", PANEL, __CVIUserHInst)) < 0)

This should take care of the TestStand/CVI problem. View the LoadPanelEx function help to explain why you were experiencing the problem.

Best of Luck,

Todd Kutzner
Digalog Systems Inc
www.digalogsys.com
0 Kudos
Message 4 of 5
(2,862 Views)
Todd,

I tried what you suggested and it worked fine.

thanks again,

Francis Murphy
AMS Ltd,
Scotland.
http://www.amsjv.com
0 Kudos
Message 5 of 5
(2,862 Views)