2 isasverificationscript:: getvscriptengine – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual
Page 47

LeCroy Corporation
Automation API for SAS/SATATracer/Trainer
Manual Version 1.11
47
4.3.2 ISASVerificationScript:: GetVScriptEngine
HRESULT GetVScriptEngine (
[in] BSTR script_name,
[out, retval] IVScriptEngine** vs_engine )
Retrieves the verification script engine object.
Parameters
script_name
Name of the verification script to initialize the verification script engine
vs_engine
Address of a pointer to the
object interface
Return values
S_OK –
if the verification script engine object was successfully retrieved.
Remarks
The name of the verification script is the name of the verification script file (*.pevs). See
remark to
ISASVerificationScript:: RunVerificationScript
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 ->RunVScript();
if( result == PASSED )
{
::MessageBox( NULL, "Test verification 1 is passed !!!", "SASTracer client",
MB_OK );
}
. . .
WSH:
Set Analyzer = WScript.CreateObject("LeCroy.SASTracer")
Set Trace = Analyzer.OpenFile( "C:\Some trace files\some_trace.sas" )
Dim Result
Set VSEngine = Trace.GetVScriptEngine( "Test1" )
Result = VSEngine.RunVScript
If Result = 1 Then
Msgbox "PASSED"
Else
Msgbox "FAILED"
End If
MsgBox( "Done" )