beautypg.com

6 itrace::reportfileinfo – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 33

background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

33

4.1.6 ITrace::ReportFileInfo


HRESULT ReportFileInfo (

[in] BSTR file_name )

Saves trace information into a specified text file

Parameters

file_name

String providing the full pathname to file where the trace information
report is stored

Return values

ANALYZERCOMERROR_UNABLESAVE

-

unable to create 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("LeCroy.SASAnalyzer")
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir & "Input\test_ro.rec")
Trace.ReportFileInfo CurrentDir & "Output\file_info.txt"

C++:
ISASTrace*

sas_trace;

TCHAR file_name[_MAX_PATH];

. . .

try

{

sas_trace->ReportFileInfo( 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;

}