TestStand 2019 Help
»View Product Info
Insert a step configured to use the ActiveX/COM Adapter and select Specify Module or Step Settings from the context menu to display the ActiveX/COM Module tab in the TestStand Sequence Editor.
The ActiveX/COM Module tab contains the following options:
- Automation Server—The name of the server the step uses. The ActiveX/COM Adapter populates the ring control with the list of ActiveX Automation servers registered with Microsoft Windows. To select a server from the list, click the ring control or the Browse for Type Library button to load a type library file from disk for a specific server. If you want the ActiveX/COM Adapter to refresh the list of registered servers and type library information, click Refresh Server List. You can also refresh the server type library information when you select File»Unload All Modules. If the server has a help file associated with it, you can open it by clicking the ? button.
||Note TestStand registers the type library with Windows when you click the ? button.
- Object Reference—An Object Reference variable or property. When a step creates an object, the ActiveX/COM Adapter assigns the object reference to the variable or property, if specified. Otherwise, the ActiveX/COM Adapter automatically releases the object reference after executing the step. If the step does not create an object, but instead calls a method or accesses a property, the Object Reference control must contain the value of a valid ActiveX reference that refers to the object on which to call the method or access the property. Click the Expression Browse button to launch the Expression Browser dialog box.
- Object Class—The name of the server class the step uses when it creates or invokes an object of the class. When you select a server, the ActiveX/COM Adapter populates this control with a list of objects defined for the server. The ring control separates the list of objects into two groups which are separated with a line. The upper group includes all top-level objects the ActiveX/COM Adapter can create. The lower group includes all other objects the server creates as a result of an invocation of a method or get property call. If a server type library contains help strings or links to a help file for a class, click the ? button to access the help.
- Create Object—When you enable this option, the step creates a new instance of the object class when the ActiveX/COM Adapter executes the step. When the step creates an object and you specify a property name in the Object Reference control, the ActiveX/COM Adapter assigns the value of the object handle to the property. Otherwise, the ActiveX/COM Adapter automatically releases the object reference after it executes the step. When you enable Create Object, you can launch the Create Options window by clicking the Create Options button.
||Note Do not select Create Object when specifying an existing ActiveX object such as RunState.Engine or RunState.Sequence in the Object Reference control.
- Call Method or Access Property—Specifies whether the step invokes a class method or accesses a class property when the ActiveX/COM Adapter executes the step. This control lists the types of access the server defines for the selected object class. The options are: Do Not Call, Call Method, Get Property, Set Property, and Set Property by Reference. When an object class does not have any methods, the control does not list the Call Method option.
After you select the type of access, the ActiveX/COM Adapter populates the Method control with the method or property names the class defines for the access type. When a server type library contains help strings or links to a help file for a method or property, click the ? button to access the help.
- Parameters Table—Contains the input and output parameters for the selected method or property. When the selected access type is Get Property, the control usually contains a single output parameter. When the access type is Set Property or Set Property by Reference, the control usually contains a single input parameter. When you call a method, the control can contain any number of input and output parameters. The ActiveX/COM Adapter automatically populates the Value field for parameters that have default values.
- 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.
- Type—ActiveX data type for the parameter.
- Direction—Specifies whether the parameter is an input or an output.
- 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.
- Default—When you enable this option, TestStand uses the default value for the parameter the type library specifies.
- Value—A TestStand expression. For input parameters, TestStand passes the value of this expression. For output parameters, TestStand stores the data the method returns in the location this expression specifies. To help you enter an expression in the Value column, click the Expression Browse button to launch the Expression Browser dialog box. For enumerated types, a combo box displays all valid values for the type. You can use an expression with an enumerated type. Refer to the ActiveX/COM Call Parameters topic for more information about using enumeration parameters.
||Note There is a known issue with using in-process (DLL) ActiveX Automation servers created with Microsoft Visual Basic from a multithreaded client application such as TestStand. This issue can cause these types of servers to fail with an access violation. Under certain circumstances, this failure can cause TestStand to crash or hang when freeing resources in the DLL.
Refer to the Microsoft support article Q186273 at support.microsoft.com/kb/186273 for more information about this issue.
Out-of-process (EXE) servers do not have this problem.
ActiveX/COM Code Module Support for 64-bit TestStand
Attributes dialog box
Create Options Window
Expression Browser dialog box
In-Process COM Servers Support in 32-bit TestStand and 64-bit TestStand
Out-of-Process COM Servers in 32-bit TestStand and 64-bit TestStand
Parameters Table Context Menu for Module Tabs
Step Settings Pane
Using the $(Platform) Path Macro to Locate the Correct Code Module in 32-bit TestStand and 64-bit TestStand