1 _isasanalyzerevents::ontracecreated – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual
Page 90
LeCroy Corporation
Automation API for SAS/SATATracer/Trainer
Manual Version 1.11
90
10.1.1 _ISASAnalyzerEvents::OnTraceCreated
HRESULT OnTraceCreated (
[in] IDispatch* trace );
Fires when a trace is created. This event is a result of
and
method calls.
Parameters
trace
Interface pointer to the SASTrace object
Return values
Remarks
Make sure the event handlers have
__stdcall calling convention.
Example
VBScript:
<OBJECT
ID = Analyzer
CLASSID = " clsid: 297CD804-08F5-4A4F-B3BA-779B2654B27C " >
</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 )
{
ISASTrace* sas_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_ISASTrace, (void**)&sas_trace );
if (FAILED(hr))
{
_com_error er(hr);
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("SASTracer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("SASTracer client"), MB_OK );
return hr;
}
. . .
return hr;
}