1 _ianalyzerevents::ontracecreated, Ianalyzerevents::ontracecreated – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 78

Advertising
background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

74

7.1.1 _IAnalyzerEvents::OnTraceCreated


HRESULT OnTraceCreated ( [in] IDispatch* trace );

Fired when trace is created; this event is a result of IUwbAnalyzer::StartRecording/
IUwbAnalyzer::StopRecording method call

Parameters

trace

Address of a pointer to the

UwbTrace

object primary interface

Return values

Remarks

Make sure the event handlers have

__stdcall

calling convention.

Example


VBScript:

<OBJECT

ID = Analyzer
CLASSID = "clsid:EE43DE29-65CA-4904-B111-32919E00D061" >

</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 )
{

IUwbTrace* UWB_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_IUwbTrace, (void**)&UWB_trace );

if (FAILED(hr))
{

_com_error er(hr);
if (er.Description().length() > 0)

::MessageBox( NULL, er.Description(), _T("UwbAnalyzer client"),

MB_OK );
else

::MessageBox( NULL, er.ErrorMessage(), _T("UwbAnalyzer client"),

MB_OK );
return hr;

}

. . .

return hr;

}

Advertising