Data Sheet

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
20
2.1.8 IAnalyzer::MakeRecording
HRESULT MakeRecording (
[in] BSTR ro_file_name,
[out, retval] IDispatch** trace );
Makes a recording with the specified recording options file.
Parameters
ro_file_name String providing the full pathname to recording options file;
If the parameter is omitted, then recording starts with the
default recording options.
trace Address of a pointer to the UsbTrace object primary interface
Return values
Remarks
This method acts like StartRecording method but does not return until recording is completed.
UsbTrace object is created via this method call, if call was successful.
The recording options file is the file with extension .rec created by the USB Protocol Suite
application. You can create such a file by selecting Setup – Recording Options… from the
USB Protocol Suite application menu, changing the recording options in the dialog, and selecting the
Save button.
Example
WSH:
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")
C++:
IDispatch* trace;
IUsbAnalyzer* usb_analyzer;
BSTR ro_file_name;
HRESULT hr;
. . .
try
{
trace = usb_analyzer->MakeRecording( ro_file_name )
}
catch ( _com_error& er)
{
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 1;
}
// query for VTBL interface
IUsbTrace* usb_trace;
hr = trace->QueryInterface( IID_IUsbTrace, (LPVOID *)&usb_trace );
trace->Release();