beautypg.com

1 _ivscriptengineevents::onvscriptreportupdated, Ivscriptengineevents::onvscriptreportupdated – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 72

background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

68

6.1.1 _IVScriptEngineEvents::OnVScriptReportUpdated

[id(1)] HRESULT OnVScriptReportUpdated([in] BSTR newLine,

[in] int TAG );


Fired when running verification script calls ReportText( newLine ) function.

Parameters

newLine

New portion of text reported by 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