Function Parameters Not Recognized Using TestStand C/C++ DLL Adapter

Updated Feb 26, 2026

Reported In

Software

  • TestStand
  • LabWindows/CVI

Other

  • Visual Studio
  • Visual Studio Code

Issue Details

When configuring a step in TestStand to call a DLL using the C/C++ DLL Adapter, the following message pops-up on screen:

 

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

 

pop-up dialog showing the message above.

 

What is the cause of this error, and which practices should I adopt to avoid it?

 

 

Solution

TestStand must obtain function prototype information to populate the parameter table. TestStand can automatically retrieve this information only if the DLL provides recognizable metadata.

 

The C/C++ DLL Adapter extracts parameter information using:

  • Decorated (mangled) C++ export names generated by Visual Studio, which encode parameter types and calling convention.
  • Prototype information embedded in DLLs built with LabWindows/CVI, which TestStand can read without requiring a standard COM type library.

 

If none of these sources are available, the DLL appears to TestStand as lacking parameter information.

 

This situation commonly occurs when:

  • The DLL is a C DLL built in Microsoft Visual Studio, which exports only bare function names and contains no prototype metadata
  • The DLL is a C++ DLL exported with extern "C", which removes decorated names and therefore removes the encoded parameter information normally present in C++ exports
  • The DLL uses data types that are not supported by the C/C++ DLL Adapter
  • The DLL does not contain a type library and no source file is provided for TestStand to parse

 

Use one of the following supported mechanisms to provide prototype information to TestStand:

 

 

C++ DLLs (Microsoft Visual Studio)

 

Export functions using standard C++ linkage so that the compiler generates decorated names (name mangling). TestStand can decode these names to determine parameter types and calling conventions.

 

Recommended:

__declspec(dllexport) int Add(int a, int b);

Avoid:

extern "C" __declspec(dllexport) int Add(int a, int b);

 

Using extern "C" suppresses name decoration and prevents the C/C++ DLL Adapter from obtaining parameter information from export names.

 

Refer to the Exporting Class Methods and Functions in Microsoft Visual Studio page in the TestStand Help for further information.


 

 

C DLLs (Microsoft Visual Studio)

 

Standard C DLLs export only function names and do not include parameter metadata. To use these DLLs with TestStand:

  • Associate a .c or .cpp file that contains the function prototype with the step
    • In the Module tab of the Step Settings Pane, click the Verify Prototype button


      Verify Prototype button

    • Search for the source code file and click OK.

  • Manually configure the function parameters in the Module tab


Adding parameters manually

 

Because C DLLs do not encode prototype information in exported symbols, TestStand cannot infer parameters automatically.

 

 

LabWindows™/CVI™ DLLs

 

DLLs built with LabWindows™/CVI™ 7.1 or later include embedded prototype information that TestStand can read directly, even for C functions that use enums, structs, or typedefs.

 

Ensure that:

  • Type Information is enabled in the CVI project
  • Only the desired symbols are marked for export

 

This is the recommended method for C‑based DLLs that need automatic parameter inference in TestStand.

 

Refer to the Create and build the LabWindows™/CVI™ DLL section of the Using LabWindows™/CVI™ Enums in TestStand Knowledgebase article to learn how to setup a CVI DLL so that TestStand can parse the function parameters, even when using the C/C++ Adapter.

 

 

Supported Data Types

 

The C/C++ DLL Adapter supports only parameter and return types that can be mapped to TestStand data types. According to the Parsing Parameters from Source Code help page:

  • Parameters must be numeric, arrays, strings, or object‑type pointers.
  • Return values must be numeric or void.

 

 

Additional Information

TestStand includes an example that demonstrates how to pass structs between TestStand and a DLL:

 

Location:
<TestStand Public>\Examples\Fundamentals\Passing Structs to Code Modules\C\Passing Structs to Code Modules.seq

 

This example shows how to map a TestStand container to a C‑style struct and call DLL functions that accept the struct by value or by reference.
To allow the DLL function to modify the contents of the TestStand container, you must pass the struct by reference.