NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand doesn't recognize the parameters that I specify using extern "C" (visual studio 2008)

Hi Everyone,

 

I am trying to develop a dll using visual studio 2008. The resulting dll will be used in TestStand. I have some functions that were created in "C" and I am using extern "C" to include those functions in my Visual Studio 2008 Solution. The code compiles and generates the dll. When I load the dll into teststand and choose a function to use from the drop down menu, teststand doesn't recognize function's parameters, and I get the following message,

 

"This function either does not have parameter information in the DLL or uses types not recognized by teststand"

 

Is there anyway to get around this issue?

 

If possible, Please attach a working code example created using Visual Studio 2008 that uses extern "C", and Teststand recognizes its parameters.

 

 

Kind Regards,

 

sheikh

 

 

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

sheikh,

 

According to the TestStand help on Exporting Class Methods and Functions in Visual Studio:

Avoid using the extern "C" syntax to export symbols. The extern "C" syntax prevents the C/C++ DLL Adapter from obtaining type information for function and method parameters.

So unfortunately, I don't think this is going to be possible. 

 

If you know the prototype information, you can define the prototype manually and still call your function.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 2 of 3
(3,996 Views)

If you use extern "C" in Visual Studio, the only way to get parameter type information into TestStand is to use a type library. See this thread for more information: https://forums.ni.com/t5/NI-TestStand/Argument-for-function-not-viewed-able-under-VC-by-teststand/m-...

 

0 Kudos
Message 3 of 3
(3,935 Views)