7 isasanalyzer::makerecording – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 19

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

19

3.1.7 ISASAnalyzer::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 SASTrace 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 SASTrace 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 SASTracer
application. You can create this file when you select “Setup –> Recording Options…”
from the SASTracer 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.SASAnalyzer")
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")


C++:

IDispatch* trace;
ISASAnalyzer* 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("SASTracer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), _T("SASTracer client"), MB_OK );
return 1;

}

// query for VTBL interface

ISASTrace* sas_trace;

hr = trace->QueryInterface( IID_ISASTrace, (LPVOID *)&sas_trace );

trace->Release();

Advertising