NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to automatically display parameters for c++ functions?

Hello,

i have a c++ library with several function that i want to use in teststand.

It seems that after selecting the dll and function that i manually have to create the parameters and types.

Is there a way (like in Dotnet) to create them automatically?

Thx

0 Kudos
Message 1 of 4
(2,542 Views)

You need to make sure that you are exporting the symbols correctly or using a type library. This normally means decorating the methods you want to call in TestStand with __declspec(dllexport). Refer to Exporting Class Methods and Functions in Microsoft Visual Studio

Kurt P
Automated Test Software R&D
0 Kudos
Message 2 of 4
(2,503 Views)

A function currently looks like this:

 

void __declspec(dllexport) Dummy(int a, int b, int* Res)

{

*Res = a+b

}

 

But TestStand only shows the function name Dummy but not the parameters.

0 Kudos
Message 3 of 4
(2,496 Views)

There is no macro for printing the arguments, but you can print the function prototype using the __PRETTY_FUNCTION__ macro

0 Kudos
Message 4 of 4
(1,793 Views)