5 ivscriptengine::launchvscript – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual
Page 76

LeCroy Corporation
Automation API for SAS/SATATracer/Trainer
Manual Version 1.11
76
8.1.5 IVScriptEngine::LaunchVScript
HRESULT LaunchVScript ( )
Launches the current verification script.
Parameters
Return values
S_FALSE – if VS Engine was not successfully launched
(Either it is already running, or the 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
_ IVScriptEngineEvents:: OnVScriptFinished
to the client event handler. You
can also terminate the running script using the method
.
Example
C++:
// In this example, we use wrapper functions provided by the #import directive.
ISASTrace* sas_trace;
. . .
ISASVerificationScript* sas_vscript = NULL;
sas_trace->QueryInterface( IID_ISASVerificationScript, (void**)&sas_vscript ) )
assert( sas_vscript != NULL );
IVScriptEngine* sas_vsengine = NULL;
sas_vsengine = sas_vscript -> GetVScriptEngine("Test_1");
assert( sas_vsengine != NULL );
VS_RESULT result = sas_vsengine ->LaunchVScript();
// You can go further without waiting for the result from the VSE object.
// If you are interested in the result, implement the client event handler for
// OnVScriptFinished() notification.
. . .