4 ianalyzeradapter::isvalidobject, Ianalyzeradapter::isvalidobject – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 129

Advertising
background image

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

129

10.1.4 IAnalyzerAdapter::IsValidObject

HRESULT IsValidObject([in] IDispatch *pObj,
[out, retval] VARIANT_BOOL* pVal );


This method helps to determine whether some automation object can be attached to the adapter.

pObj

Pointer to the object validated


pVal

Pointer to the variable receiving result

TRUE if the validated object can be attached

FALSE otherwise.

Parameters


Return values


Remarks

Only CATC Analyzer COM servers can be attached to the adapter.

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

'Launch MS Excel instead of USBTracer!!!

Set Analyzer = CreateObject("Excel.Application")
Analyzer.Visible = True

If Not AnalyzerAdapter.IsValidObject(Analyzer) Then

MsgBox "The object cannot be attached", vbCritical
Set Analyzer = Nothing

Exit Sub

End If

End Sub

-->
</SCRIPT>











Advertising