C/C++ DLL Module Tab
- Updated2025-07-21
- 6 minute(s) read
C/C++ DLL Module Tab
Insert a step configured to use the C/C++ DLL Adapter and select Specify Module or Step Settings from the context menu to display the C/C++ DLL Module tab in the TestStand Sequence Editor . The C/C++ DLL Module tab contains the following options:
-
Module
—The pathname of the DLL file that contains the function the step calls. You can specify an absolute or relative pathname for the DLL file. Relative pathnames are relative to the TestStand
search directory paths
.
You can customize the search directory paths using the Edit Search Directories dialog box.
- Function —Selects the function in the code module the step calls. If a DLL file contains a type library or if a type library exists with the same name as the DLL file, the C/C++ DLL Adapter automatically populates the Function ring control with all of the function names in the type library. Otherwise, the C/C++ DLL Adapter reads the DLL file and finds the names of all functions the DLL exports. The C/C++ DLL Adapter also includes the names of exported, static C++ class methods that use data types TestStand supports . If a DLL type library contains links to a help file for a function, you can click the ? button to access the help.
- Reload Prototype —Allows the user to refresh the parameter information for the function call. If you create a DLL using LabWindows/CVI 7.1 or later, TestStand can read the prototype information for the currently selected function without the use of a type library.
-
Code Template
—The code template to which the module call adheres. TestStand lists the code templates the step type defines. The Code Template control contains the following default options:
- None —Specifies if the module call does not adhere to a prototype of any code template. When you select this option, the New and Delete buttons in the Parameters Table are enabled.
- Default template for Visual C++ 6.0 SP3 or greater —Specifies whether the module adheres to the default template for the C/C++ adapter when used with Microsoft Visual C++.
-
Parameters Table
—Shows all of the available parameters for the function call and an entry for the return value. The Parameters Table control contains the following columns:
-
Parameter Name
—A symbolic name for the parameter.
Note Parameters with attributes include an Edit Attributes button in the Name column of the Parameters Table. TestStand associates parameter attributes with the module parameter, which TestStand stores with the step configuration information, not with the parameter value that TestStand passes to the module. Right-click an item in the Parameter Table to access the Parameters Table context menu, from which you can launch the Attributes dialog box. You cannot edit attributes for the real and imaginary parts of complex parameters and complex vector parameters in the C/C++ DLL Adapter.
- Description —The short description of the parameter type using C++ syntax.
- Log —When you enable this option, the step logs the parameter as an additional result. Enabling this option is equivalent to using the checkbox next to the additional result name on the Additional Results panel of the Properties tab of the Step Settings pane. For in/out parameters, enabling this option enables the [In] parameter and the [Out] parameter on the Additional Results panel. This option is indeterminate for in/out parameters if you specify to log only the [In] parameter value or only the [Out] parameter value. If this option is indeterminate, a tooltip specifies whether the Additional Results panel specifies to log the [In] parameter value or the [Out] parameter value.
- Value Expression —The argument expression to pass.
When you select a parameter in the view, the Parameter Details Table control displays specific details about the parameter. To insert or remove parameters, click New or Delete . To rearrange the parameter order, select the parameter you want to move and click Move Up or Move Down . You must select the None code template before attempting to insert, remove, or rearrange parameters.
-
Parameter Name
—A symbolic name for the parameter.
-
Parameter Details Table
—The data type of each parameter and additional information according to each parameter type.
- Category —A group of data types to list in the Data Type control. The following categories are available in the Category ring control: Numeric , Boolean , String , Enumeration , Object , TS Object , C Struct , Arrays , selected C++ class , and Pointer/Handle types.
Note The C/C++ DLL Adapter supports numeric return values, which includes Boolean, void*, and void. - Create Code —Creates the source code shell for the function. You must specify an existing source file when creating code in Visual Studio. If the source file you specify does not already exist when creating code in a text file, the adapter creates it. If the file already exists, the C/C++ DLL Adapter appends the function to the end of the file. If a code template file exists for the step type you use for the step, the C/C++ DLL Adapter uses the template to create the shell of the new function. When the project file you specify is not in the solution, the C/C++ DLL Adapter prompts you to add it. When the source file you specify is not in the project, the C/C++ DLL Adapter prompts you to add it. When the C/C++ DLL Adapter creates the code, the adapter launches the application currently registered on the system for the type of the file, such as Visual Studio for .cpp files, and displays the file in the application.
- Edit Code —Edits the source code for the function if the source code already exists.
- Verify Prototype —Checks for any conflicts between the source code and the parameter information on the Module tab. Refer to Parsing Parameters from Source Code for more information about how the adapter interprets parameter declarations when parsing source code.
- Source Code Files —Launches the DLL Source Code Files window, in which you can specify the pathname for the source file, project file, and solution file that implements the function the module calls.
- Function Call —Directly edits the function name and all function arguments at once.
Editing the Function Call
You can use the various controls on the C/C++ DLL Module tab to edit the function name and the argument values of the function. You can also use the Function Call control to directly edit the function name and all of the function arguments at once. In the Function Call control, edit the call just as you would in a source code editor. If you enter a number of arguments different than the function prototype specifies, TestStand prompts you to alter the prototype to match the number and type of arguments you specify.
When you make a change in the Function Call control, the following buttons appear while all other controls dim:
- Accept —Applies the changes you make in the Function Call control.
- Revert —Discards the changes you make in the Function Call control.
See Also
Exporting Class Methods and Functions in Microsoft Visual Studio
Edit Search Directories dialog box
Locating the Correct DLL in 32-bit TestStand and 64-bit TestStand
Parsing Parameters from Source Code
Parameters Table Context Menu for Module Tabs
Using Side-by-Side Versions of the LabWindows/CVI Run-Time Engine with TestStand