beautypg.com

2 ianalyzeradapter::attach, Parameters, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 147: Remarks, Example, Sub btnconnect_onclick, Vbscript functioncreates object locally, Ianalyzeradapter::attach

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

142

12.1.2 IAnalyzerAdapter::Attach


HRESULT Attach(

[in] IDispatch* pObj )


This method attaches the LeCroy analyzer object to the adapter.

Parameters

pObj

Pointer to the LeCroy analyzer object to be attached.

Return values

Remarks

Only LeCroy analyzer COM servers can be attached to the adapter. If some other analyzer object were

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" )
...