beautypg.com

6 itrace::reportfileinfo, Saves trace information into a specified html file, Parameters – Teledyne LeCroy Automation API for Teledyne LeCroy PETracer_PETrainer User Manual

Page 41: Return values, Remarks, Example, Itrace::reportfileinfo

background image

Teledyne LeCroy

Automation API for PETracer/PETrainer

36

4.1.6 ITrace::ReportFileInfo


HRESULT ReportFileInfo (

[in] BSTR file_name )

Saves trace information into a specified HTML file.

Parameters

file_name

String providing the full pathname to a file where the trace information

report is stored

Return values

ANALYZERCOMERROR_UNABLESAVE

Unable to create the trace information report

Remarks

Creates a new trace information file if the file specified in the file_name parameter does not exist.

Example


WSH:

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

C++:

IPETrace* pe_trace;
TCHAR file_name[_MAX_PATH];

. . .

try

{

pe_trace->ReportFileInfo( file_name );

}
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;

}