In some cases, you might need to obtain a different interface for a TestStand object than the current interface. In ActiveX/COM terminology, this action is called a QueryInterface.

For example, when you have a Module reference to a LabVIEWModule object and need to access the LabVIEWModule interface instead, perform a QueryInterface on the Module object to obtain the LabVIEWModule interface. In LabVIEW, use the Variant To Data function with the reference to accomplish this task.

The block diagram in the following figure shows how to obtain the LabVIEWModule interface of a Module object to obtain the VIDescription property of the object. Notice that you must release the reference the Variant To Data function returns when you are finished with it.

Selecting an ActiveXServer Class

Complete the following steps to select an ActiveX Server class (type) for an Automation refnum control or constant.

  1. Right-click the Automation control or constant and select Select ActiveX Class»Browse to launch the Select Object From Type Library dialog box.
  2. Select the appropriate ActiveX Server from the Type Library list control.
  3. Confirm that the Show Creatable Objects Only option is not selected.
  4. Select the required ActiveX Server Class in the Object control.
  5. Click OK to close the Select Object From Type Library dialog box.

For example, the LabVIEWModule class is defined in the NI TestStand <version> Adapter API <version> Version 1.0 Server. To select the LabVIEWModule class, select NI TestStand <version> Adapter API <version> Version 1.0 as the ActiveX server, and then select LabVIEWModule as the required ActiveX Server Class in the Object control.