2 _ivscriptengineevents::onvscriptfinished, Fired when the verification script stops running, Parameters – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual
Page 137: Return values, Remarks, Example, Uses_conversion, Public withevents vseevents as vscriptengine, Dim resstring as string, Ivscriptengineevents::onvscriptfinished

Teledyne LeCroy
Automation API for PETracer/PETrainer
132
10.1.2 _IVScriptEngineEvents::OnVScriptFinished
HRESULT OnVScriptFinished (
[in] BSTR script_name,
[in] VS_RESULT result,
[in] int TAG )
Fired when the verification script stops running.
Parameters
script_name
Name of the verification script
result
Result of the "verification", see
IPEVerificationScript::RunVerificationScript method, Page 43, 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 PEAutomationLib.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