1 ianalyzerevents::ontracecreated, Ianalyzerevents::ontracecreated, Catc ver. 1.40 – Teledyne LeCroy Automation API for Bluetooth Analyzers User Manual
Page 84

78
Automation API for CATC Bluetooth Analyzers
CATC
Ver. 1.40
2.9.1 IAnalyzerEvents::OnTraceCreated
Fired when trace is created; this event is a result of IAnalyzer::StartRecording/ IAnalyzer::StopRe-
cording method call
Parameters
trace
-
address of a pointer to the
BTTrace
object primary interface
Return values
Remarks
Make sure the event handlers have
__stdcall
calling convention.
Example
VBScript:
<OBJECT
ID = Analyzer
CLASSID = "clsid:0B179BB3-DC61-11d4-9B71-000102566088" >
</OBJECT>
<P ALIGN=LEFT ID=StatusText></P>
<SCRIPT LANGUAGE="VBScript">
<!--
Dim CurrentTrace
Sub Analyzer_OnTraceCreated(ByRef Trace)
On Error Resume Next
Set CurrentTrace = Trace
If Err.Number <> 0 Then
MsgBox Err.Number & ":" & Err.Description
End If
StatusText.innerText = "Trace'" & CurrentTrace.GetName & "' created"
End Sub
-->
</SCRIPT>
C++:
HRESULT __stdcall OnTraceCreated( IDispatch* trace )
{
IBTTrace* bt_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_IBTTrace, (void**)&bt_trace );
if (FAILED(hr))
{
_com_error er(hr);
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("BTAnalyzer client"),
MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("BTAnalyzer client"),
MB_OK );
return hr;
}
. . .
return hr;
}
HRESULT OnTraceCreated (
[in] IDispatch* trace );