4 ivscriptengine::runvscriptex, Ivscriptengine::runvscriptex – Teledyne LeCroy USB Analyzer Automation Manual User Manual
Page 86
Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
86
5.1.4 IVScriptEngine::RunVScriptEx
HRESULT RunVScriptEx([in] BSTR script_name,
[out, retval] int* pResult);
Changes the current verification script name and runs verification script.
Parameters
script_name
Name of the verification script to initialize script verification engine.
PResult
Address of variable in which to store the result of verification.
See
IUsbVerificationScript::RunVerificationScript
Return values
Remarks
This method makes a “synchronous” call, so this method does not return until the script stops running.
Example
C++:
// In this example, use wrapper functions provided by #import directive.
IUwbTrace* usb_trace;
. . .
IUsbVerificationScript* usb_vscript = NULL;
usb_trace->QueryInterface( IID_ IUsbVerificationScript, (void**)&usb_vscript ) )
assert( usb_vscript != NULL );
IVScriptEngine* usb_vsengine = NULL;
usb_vsengine = usb_vscript -> GetVScriptEngine("Test_1");
assert( usb_vsengine != NULL );
VS_RESULT result = usb_vsengine ->RunVScript();
if( result == PASSED )
{
::MessageBox( NULL, "Test 1 passed !!!", "UsbAnalyzer client", MB_OK );
}
result = usb_vsengine ->RunVScriptEx("Test_2");
if( result == PASSED )
{
::MessageBox( NULL, "Test 2 passed !!!", "UsbAnalyzer client", MB_OK );
}
result = usb_vsengine ->RunVScriptEx("Test_3");
if( result == PASSED )
{
::MessageBox( NULL, "Test 3 passed !!!", "UsbAnalyzer client", MB_OK );
}
. . .