beautypg.com

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

Page 78

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:

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





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;

}