beautypg.com

2 ianalyzeradapter::attach, Ianalyzeradapter::attach – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 126

background image

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite

126

10.1.2 IAnalyzerAdapter::Attach

HRESULT Attach([in] IDispatch* pObj);


This method attaches a CATC Analyzer object to the adapter.

Parameters


pObj

Pointer to the CATC Analyzer object to be attached.

Return values

Remarks


Only CATC Analyzer COM servers can be attached to the adapter. If some other Analyzer object

was previously attached to the adapter, it is detached by this call.

When the Analyzer object gets attached to the adapter, a client application using the adapter

becomes able to handle automation events fired by the remote Analyzer object through the adapter

.

Example

VBScript:


classid=clsid:A0CB5386-38BA-4970-8782-3D1B707C3E5F>


...


WSH:

' Create CATC analyzer adapter first.
Set AnalyzerAdapter = WScript.CreateObject("CATC.AnalyzerAdapter", "Analyzer_")

' VBScript functioncreates object locally.
Set Adapter = WScript.CreateObject("CATC.AnalyzerAdapter")

AnalyzerAdapter.Attach Analyzer ' Attach analyzer object to the adapter.
Analyzer.StartRecording (Analyzer.ApplicationFolder & "my.rec")
...