2 ivscriptengineevents::onvscriptfinished – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual
Page 86

LeCroy Corporation
Automation API for SAS/SATATracer/Trainer
Manual Version 1.11
86
9.1.2 IVScriptEngineEvents::OnVScriptFinished
HRESULT OnVScriptFinished (
[in] BSTR script_name,
[in] VS_RESULT result,
[in] int TAG )
Fires when running a verification script. Calls the ReportText( newLine ) function (please
refer to the SASTracer Verification Script Engine Manual for details on the ReportText
function).
Parameters
script_name
Name of the verification script
result
Result of "verification"
See
ISASVerificationScript::RunVerificationScript
method for details.
TAG
VSE
object's
tag
Return values
Remarks
Make sure that C++ event handlers have __stdcall calling convention.
Example
C++:
HRESULT __stdcall CComplTestSink::OnVScriptFinished(
BSTR script_name,
VS_RESULT result, int TAG )
{
USES_CONVERSION;
TCHAR tmp[220];
sprintf( tmp, "Script completed, name : %s, result = %d, TAG = %d",
W2A(script_name),
result, TAG );
. . .
return S_OK;
}
VBA (MS Excel):
Public WithEvents VSEEvents As VScriptEngine
. . .
Private Sub VSEEvents_OnVScriptFinished( ByVal script_name As String,
ByVal result As SASAutomationLib.VS_RESULT,
ByVal Tag As Long )
Dim ResString As String
ResString = "Script name : " & script_name & ", result = " &
CStr(result) & ", TAG = " & CStr(Tag)
ThisWorkbook.Sheets("Sheet1").Cells(7, 2) = ResString
End Sub