Manual
Teledyne LeCroy Automation API for PETracer/PETrainer
145
12.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.
Parameters
pObj
Pointer to the object validated
pVal
Pointer to the varable receiving result. TRU
E if the validated object can
be attached, FALSE otherwise
Return values
Remarks
Only LeCroy 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 PETracer !!!
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>