5 ifcanalyzer::makerecording – Teledyne LeCroy SierraFC Automation API User Manual
Page 15

LeCroy Corporation
SierraFC M8-4 API Reference Manual
Manual Version 1.00
15
3.1.5 IFCAnalyzer::MakeRecording
HRESULT MakeRecording (
[in] BSTR ro_file_name,
[out, retval] IDispatch** trace );
Makes recording with the specified recording options file.
Parameters
ro_file_name
String providing the full pathname to a recording options file;
If the parameter is omitted, recording starts with default recording
options.
trace
Address of a pointer to the FCTrace object interface
Return values
ANALYZERCOMERROR_UNABLESTARTRECORDING -
unable to start recording
Remarks
This method acts like the StartRecording method but will not return until recording is
completed. The FCTrace object is created via this method call, if the call was
successful.
The recording options file is the file with extension .rec created by the SierraFC Protocol
Analyzer application. You can create this
file when you select ―Setup –> Recording
Options…‖ from the SierraFC Protocol Analyzer application menu, change the recording
options in the
―Recording Options‖ dialog, and select the ―Save…‖ button.
Example
WSH:
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("Lecroy.FCAnalyzer")
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")
C++:
IDispatch* trace;
IFCAnalyzer* sas_analyzer;
BSTR ro_file_name;
HRESULT hr;
. . .
try
{
trace = sas_analyzer->MakeRecording( ro_file_name )
}
catch (_com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("SierraFC M8-4 client"), MB_OK
);
else
::MessageBox( NULL, er.ErrorMessage(), _T("SierraFC M8-4 client"), MB_OK
);
return 1;
}
// query for VTBL interface
IFCTrace* sas_trace;
hr = trace->QueryInterface( IID_IFCTrace, (LPVOID *)&sas_trace );