1 _ivscriptengineevents dispinterface, Ivscriptengineevents dispinterface – Teledyne LeCroy USB Analyzer Automation Manual User Manual
Page 93
![background image](/manuals/353630/93/background.png)
Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
93
6 Verification Script Engine Events Callback
Interface
6.1 _IVScriptEngineEvents dispinterface
To retrieve the event notifications from the UsbAnalyzer application when a verification script engine
object is running a script, you must implement the _IVScriptEngineEvents callback interface.
Because this interface is a default source interface for the
IVScriptEngine object, there is a very simple
implementation from such languages as Visual Basic, VBA, VBScript, and WSH.
Remarks
Some script engines impose restrictions on handling events from “indirect” automation objects in
typeless script languages (when the automation interface to the object is obtained from a call of some
method, rather than from a creation function
– like CreateObject() in VBScript). Teledyne LeCroy PSG
USB Protocol Suite
™ provides a special COM class that allows receiving and handling notifications from
VSE objects, even in script languages not supporting event handling from "indirect" objects.
(Please refer to
Example
The C++ implementation used in the examples below implements an event sink object by deriving from
IDispEventImpl
but not specifying the type library as a template argument. Instead, the type library and
default source interface for the object are determined using
AtlGetObjectSourceInterface(). A
SINK_ENTRY()
macro is used for each event from each source interface to be handled: