Hello,
There are few actions you will want to take to call the function in the DLL and to pass a reference to the struct you are using. You will want to: (1) Create a data type to match the struct; (2) Set the properties of this new type to allow it to be passed as a C Struct; (3) Create a variable of this new type; (4) Use the C/C++ DLL Adapter and insert a step whose code module is the function call.
For details on creating and using a custom data type, refer to Chapter 12 of the TestStand Reference Manual. This chapter includes sections on "Creating and Modifying Custom Data Types" and "Using Data Types".
Here is more on each of the actions mentioned above:
(1) To start, you will want to create a new data type to mirror your struct. You can use the TestStand Container type as an analog to the C Struct. Insert a number for the long and an array of numbers to capture the array of floats in your struct.
You might also find
KnowledgeBase 2L7AIT7C: How Do I Create a Container in TestStand? to be a useful document for this action.
(2) Once the data type is created, you will want to right-click the type and select Properties. The Properties dialog includes a C Struct Passing tab. You will want to Allow Objects of This Type to Be Passed as Structs.
Also on this C Struct Passing tab, you will want to select each property of the container and specify the appropriate numeric type. For example, select the Property that matches the long and select Signed 32-bit Integer as the Numeric Type.
(3) Create a local or global variable of this new data type.
(4) Choose the C/C++ DLL Adapter and insert a step in your sequence. You can right-click on the step and select to specify module. The Edit C/C++ DLL Call dialog will be opened.
Select your DLL and your function. You may be warned that No Parameter Information is available. If so, you will need to simply to press the New button to add parameters to the prototype.
For the struct/container parameter, you will want to select the local or global variable you created in (3) as the Value Expression, C Struct for the Category, and your new data type from (1) as the Type.
Once you have completed these four actions, you have successfully configured TestStand to call the function in your DLL.
Regards,
Eric M