beautypg.com

1 _ivscriptengineevents::onvscriptreportupdated, Parameters, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 136: Remarks, Example, Public withevents vseevents as vscriptengine, End sub, Ivscriptengineevents::onvscriptreportupdated

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

131

10.1.1 _IVScriptEngineEvents::OnVScriptReportUpdated


HRESULT OnVScriptReportUpdated (

[in] BSTR newLine,
[in] int TAG )

Fired when running a verification script, calls the ReportText( newLine ) function (please refer to the PETracer
Verification Script Engine Manual
for details on the ReportText function).

Parameters

newLine

New portion of text reported by the verification script

TAG

VSE object's tag

Return values


Remarks

Make sure that C++ event handlers have __stdcall calling convention.

Example


C++:

HRESULT __stdcall OnVScriptReportUpdated (BSTR newLine, int TAG )
{

TRACE( "Line: %s, TAG: %d\n", newLine, TAG );

. . .

return S_OK;

}


VBA (MS Excel):


Public WithEvents VSEEvents As VScriptEngine
Public LineIndex As Integer
. . .
Private Sub VSEEvents_OnVScriptReportUpdated(ByVal newLine As String, ByVal Tag As Long)

ThisWorkbook.Sheets("Sheet1").Cells(LineIndex, 1) = newLine
LineIndex = LineIndex + 1

End Sub