NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a function from a dll written by using visual studio c++

 

Hi, how can i call a function from a dll which is written by visual studio c++ in test stand?  Although the functions in dll are exported and i've chosen c/c++ adapter, i saw no function in test stand. Is there a different step while i'm calling a function from a dll written by c++ than calling a function from a dll written by cvi?

0 Kudos
Message 1 of 4
(3,403 Views)

Hi,

 

You have to use the C/C++ Codemodule Adapter.

There are some examples shipped with TS.

 

I recommend to take a look at the

ALLUSERSFOLDER\Documents\National Instruments\TestStand 2010\Examples\Demo\Misc\runforever.seq

 

Hope this helps

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 4
(3,387 Views)

How are you exporting your functions? I recommend using the __declspec(dllexport) keyword. What version of Visual studio are you using? The functions should generally be showing up in the list.

 

-Doug

0 Kudos
Message 3 of 4
(3,378 Views)

Hey Sadik,

 

Selecting the C/C++ DLL Adapter Module should be sufficient for this. When you drag an action step for this onto the Main Step and navigate to the location of the DLL, the function list should populate and you should be able to select the function you want to use. If this is not the case, would you be able to post this DLL so that we can test this on our end?

Regards,
Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,366 Views)