beautypg.com

2 _ianalyzerevents::onstatusreport, Ianalyzerevents::onstatusreport – Teledyne LeCroy USB Analyzer Automation Manual User Manual

Page 118

background image

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite

118


HRESULT OnTraceCreated (

[in] IDispatch* trace );


Fired when trace is created.
This event is a result of an IAnalyzer::StartRecording or IAnalyzer::StopRecording method call.

Parameters

trace

Address of a pointer to the

UsbTrace

object primary interface

Return values

Remarks

Make sure the event handlers have

__stdcall calling convention.

Example


VBScript:

ID = Analyzer
CLASSID = "clsid:0B179BB3-DC61-11d4-9B71-000102566088" >





C++:

HRESULT __stdcall OnTraceCreated( IDispatch* trace )
{

IUsbTrace* usb_trace;
HRESULT hr;
hr = trace->QueryInterface( IID_IUsbTrace, (void**)&usb_trace );
if (FAILED(hr))
{

_com_error er(hr);
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("UsbAnalyzer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(),_T("UsbAnalyzer client"), MB_OK );
return hr;
}


. . .
return hr;

}


9.1.2 _IAnalyzerEvents::OnStatusReport