Module Tab - Edit C/C++ DLL Call Dialog Box

Module Tab

The Module tab contains the following options:

  • Module Pathname —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. Use the Edit Search Directories dialog box to customize the search directory paths .
  • Function Name —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 Name 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. When 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. When 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.
  • Edit Prototype —Enables you to edit the function prototype. The C/C++ DLL Adapter disables this control when it reads a function prototype from the code module type library. Enable this control to manually edit the function prototype.
  • 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:
    • 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 Parameters 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 in the Additional Results dialog box. For in/out parameters, enabling this option enables the [In] parameter and the [Out] parameter in the Additional Results dialog box. 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 dialog box specifies to log the [In] parameter value or the [Out] parameter value.
    • Value Expression —The argument expression to pass.
    If a DLL file contains a type library or if a type library exists with the same base name as the DLL file that resides in the same directory as the DLL file, the C/C++ DLL Adapter queries the type library for the parameter list information. In addition, if a DLL file contains export information, such as C++ type information Visual Studio creates, the C/C++ DLL Adapter obtains the parameter list information from the DLL file. If the adapter finds parameter list information for the function it displays, it automatically updates the Parameters section when you select a new function in the Function Name ring control. You can request the C/C++ DLL Adapter to query the type information for the currently selected function at any time by clicking Reload Prototype . If the module file does not have type information, you must enter parameter information manually.

    When you select a parameter in the view, the specific details about it are displayed in the Parameter Details Table control. 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 Details Table —The data type of each parameter and additional information according to each parameter type.
    Note The C/C++ DLL Adapter supports numeric return values, which includes Boolean, void*, and void.
  • Prototype —The prototype of the specified function in C/C++ syntax.
  • Function Call —Directly edits the function name and all of function arguments at once.

Editing the Function Call

You can use the various controls on the 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 different number of arguments than the function prototype specifies, TestStand launches the Prototypes Conflict dialog box, in which you can alter the prototype to match the number of arguments you specify.

When you make a change in the Function Call control, the following buttons appear while all other controls dim:

  • Browse —Inserts variables, properties, or expression operators into the Function Call control.
  • Go to Error —Goes to the highlighted syntax error in the Function Call control.
  • Accept —Applies the changes you make in the Function Call control.
  • Revert —Discards the changes you make in the Function Call control.
Note You can use the C/C++ DLL Adapter to call functions with variable argument lists.

See Also

Additional Results dialog box

Attributes dialog box

Edit Search Directories dialog box

Exporting Class Methods and Functions in Microsoft Visual Studio

Locating the Correct DLL in 32-bit TestStand and 64-bit TestStand

Expression Operators

Parameters Table Context Menu for Specify Module Dialog Boxes

Prototypes Conflict dialog box

Using Side-by-Side Versions of the LabWindows/CVI Run-Time Engine with TestStand

Using the $(Platform) Path Macro to Locate the Correct Code Module in 32-bit TestStand and 64-bit TestStand