beautypg.com

7 ianalyzer::makerecording, Parameters, Return values – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 18: Remarks, Example, Ianalyzer::makerecording

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

13

3.1.7 IAnalyzer::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, then recording starts with default
recording options

trace

Address of a pointer to the

PETrace object interface

Return values

ANALYZERCOMERROR_UNABLESTARTRECORDING

Unable to start recording

Remarks

This method acts like the

StartRecording

method but does not return until recording is completed. The

PETrace 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 PETracer application. You can

create this file when you select “Setup -> Recording Options…” from the PETracer application menu, change
the settings in the “Recording Options” dialog box, and then select the “Save…” button.

Example


WSH:

CurrentDir = Left( WScript.ScriptFullName, InstrRev( WScript.ScriptFullName, “\” ) )
Set Analyzer = WScript.CreateObject( “CATC.PETracer” )
Set Trace = Analyzer.MakeRecording( CurrentDir & "Input\test_ro.rec" )


C++:

IDispatch* trace;
IPEAnalyzer* pe_analyzer;
BSTR ro_file_name;
HRESULT hr;

. . .

try
{

trace = pe_analyzer->MakeRecording( ro_file_name ).Detach();

}
catch ( _com_error& er)
{

if (er.Description().length() > 0)

::MessageBox( NULL, er.Description(), _T("PETracer client"), MB_OK );

else

::MessageBox( NULL, er.ErrorMessage(), _T("PETracer client"), MB_OK );

return 1;

}


// query for VTBL interface
IPETrace* pe_trace;

hr = trace->QueryInterface( IID_IPETrace, (LPVOID *)&pe_trace );
trace->Release();