|Download Help (Windows Only)|
You can pass variables and properties you create with named data types to function parameters that accept structures. When you create or edit a data type, you specify whether the type can be a C structure argument and how the type represents itself in memory when you pass it to a structure parameter. When you specify the data to pass for the struct parameter on the Module tab of the Step Settings pane, you only need to specify an expression that evaluates to data with the data type.
When you select the C Struct category for a parameter, the LabWindows/CVI Adapter displays the Type and Pass controls. The Type control specifies the TestStand named data type the adapter uses to determine how to pack the structure elements in memory. The Pass control specifies whether TestStand passes the value of the argument you specify in the Value Expression control or passes a pointer to the argument. If you select By Reference (by pointer), the adapter passes a pointer to the argument value. When you pass a C struct by reference, a member of the C struct uses the CAObjHandle data type, and the function alters the value of the struct member, do not use the function to discard the original handle. TestStand discards the original handle after the call completes.
If you choose to pass a pointer, the argument you specify in the Value Expression control must be the name of a variable or property.