2 ianalyzeradapter::attach, Ianalyzeradapter::attach – Teledyne LeCroy UWBTracer Automation Manual User Manual
Page 86

LeCroy
UWBTracer Automation API Reference Manual
Manual Version 3.02
82
8.1.2 IAnalyzerAdapter::Attach
HRESULT Attach([in] IDispatch* pObj);
This method attaches 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 was
previously attached to the adapter it will be 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 adapter
.
Example
VBScript:
</HEAD>
<OBJECT id=AnalyzerAdapter
classid=clsid:A0CB5386-38BA-4970-8782-3D1B707C3E5F>
</OBJECT>
...
<input type="button" value="Connect" name="BtnConnect">
<SCRIPT LANGUAGE="VBScript">
<!--
Sub BtnConnect_onclick
On Error Resume Next
Set Analyzer = CreateObject("CATC.UWBAnalyzer" ) 'VBScript function creates object
locally
if Not Analyzer Is Nothing Then
AnalyzerAdapter.Attach Analyzer ' attach analyzer to the adapter
window.status = "UWBTracer connected"
else
msg = "Unable to connect to UWBTracer"
MsgBox
msg,
vbCritical
window.status
=
msg
End If
End Sub
-->
</SCRIPT>
WSH:
' Create LeCroy 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" )
...