4 iuwbtrace::saveas, Iuwbtrace::saveas – Teledyne LeCroy UWBTracer Automation Manual User Manual
Page 37

LeCroy
UWBTracer Automation API Reference Manual
Manual Version 3.02
33
4.1.4 IUwbTrace::SaveAs
HRESULT SaveAs ( [in] BSTR file_name );
Saves trace into a file and makes the current IUwbTrace pointer to refer to this file.
Parameters
file_name
String providing the full pathname to file where trace is saved
Return values
ANALYZERCOMERROR_UNABLESAVE
Unable to save trace file
Remarks
Use this method if you want to move recorded or opened trace into the file.
Example
WSH:
Set Analyzer = WScript.CreateObject("CATC.UwbAnalyzer")
CurrentDir = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))
Analyzer.StartRecording (CurrentDir & "test_ro.rec")
'... do something
Set Trace = Analyzer.StopRecordingAndWaitForTrace
Trace.SaveAs CurrentDir & "Output\saved_file.uwb"
C++:
IUwbTrace*
UWB_trace;
TCHAR file_name[_MAX_PATH];
LONG packet_from;
LONG packet_to;
...
try
{
UWB_trace->SaveAs( file_name );
}
catch ( _com_error& er )
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("UwbAnalyzer client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), _T("UwbAnalyzer client"), MB_OK );
return 1;
}