3 ianalyzeradapter::detach, Ianalyzeradapter::detach – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 87

Advertising
background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

83

8.1.3 IAnalyzerAdapter::Detach

HRESULT Detach();


This method detaches the LeCroy analyzer object from the adapter.

Parameters


Return values


Remarks

This method detaches an analyzer object from the adapter. This method doesn't guarantee that all
resources associated with the detached object will be freed. All existing pointers to that object should be
released to destroy the remote object.

Example


VBScript:

</HEAD>
<OBJECT id=AnalyzerAdapter

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

</OBJECT>
...
<input type="button" value="Connect" name="BtnConnect">
<input type="button" value="Disconnect" name="BtnDisconnect">
<INPUT NAME="RemoteServer">

<SCRIPT LANGUAGE="VBScript">
<!--
Sub BtnConnect_onclick

On Error Resume Next

Set Analyzer = AnalyzerAdapter.CreateObject("CATC.UWBAnalyzer",

RemoteServer.value)


if Not Analyzer Is Nothing Then

window.status = "UWBTracer connected"

else

msg = "Unable to connect to UWBTracer"

MsgBox

msg,

vbCritical

window.status

=

msg

End If

End Sub

Sub BtnDisconnect_OnClick
AnalyzerAdapter.Detach

' Detach the analyzer object from adapter

Set Analyzer = Nothing ' Release the pointer to the analyzer returned by

CreateOject()


window.status = "UWBTracer disconnected"

End Sub
-->
</SCRIPT>

Advertising