beautypg.com

5 ivscriptengine::launchvscript, Launches verification script, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 127: Remarks, Example, Ipetrace* pe_trace, Ipeverificationscript* pe_vscript = null, Vs_result result = pe_vsengine ->launchvscript(), Ivscriptengine::launchvscript

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

122

9.1.5 IVScriptEngine::LaunchVScript

HRESULT LaunchVScript()


Launches verification script.

Return values

S_FALSE

If VS Engine was not successfully launched
(either it is already running or verification script was not found )

Remarks

This method makes an “asynchronous” call, which means that this method immediately returns after the

script starts running.

When the verification script stops running, the VSE object sends a special event notification

OnVScriptFinished (see Page 116) to the client event handler. You can also terminate the running script using
the method Stop (Page 107).

Example

C++:

// In this example we use wrapper functions provided by #import directive
//

IPETrace* pe_trace;


. . .


IPEVerificationScript* pe_vscript = NULL;

pe_trace->QueryInterface( IID_IPEVerificationScript, (void**)&pe_vscript ) )

assert( pe_vscript != NULL );

IVScriptEngine* pe_vsengine = NULL;
pe_vsengine = pe_vscript -> GetVScriptEngine("Test_1");
assert( pe_vsengine != NULL );

VS_RESULT result = pe_vsengine ->

LaunchVScript

();


// You can go further without waiting the result from the VSE object.
// If you interested in the result you should implement the client event handler for
// OnVScriptFinished() notification.

. . .