Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Creating the TestStand Engine

4 ratings | 2.75 out of 5
Print

Overview

When writing an application using the TestStand API, you must create a TestStand Engine object. Because you can create the TestStand Engine as either an ActiveX control or as an ActiveX automation server, you can use it from a variety of software development environments. If you use a development environment that supports ActiveX controls with events, such as Microsoft Visual Basic or Microsoft Visual C/C++, create the TestStand Engine object by adding the TestStand Engine control to the main form of your application. If your development environment does not support ActiveX controls, you can create the TestStand Engine object as an in-process automation server.

LabWindows/CVI

CAObjHandle engineObj = 0;
TS_NewEngine(NULL, &engineObj);

Visual Basic


Just add TestStand Engine as an ActiveX control on your main form.

Visual C++


Using the TestStand MFC Wrapper:
    Engine engineObj;
    engineObj.CreateDispatch("TestStand.Engine");

Using Compiler COM support:
    TS::IEnginePtr m_engine;
    HRESULT res = m_engine.CreateInstance("TestStand.Engine");

    LabVIEW


4 ratings | 2.75 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).