1 itrace::getname, Itrace::getname – Teledyne LeCroy FireInspector Automation Application Programming Interface User Manual
Page 31

27
FireInspector Automation User’s Manual
CATC
Version 1.0
2.4.1
ITrace::GetName
Retrieves trace name.
Syntax
HRESULT GetName (
[out, retval] BSTR* trace_name );
Parameters
Return values
•
trace_name
–
the name of the trace
Remarks
This name can be used for presentation purposes.
Do not forget to free the string returned by this method call.
Example
WSH:
Set Analyzer = WScript.CreateObject("CATC.FwAnalyzer")
CurrentDir = Left(WScript.ScriptFullName,
InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir &
"Input\test_ro.rec")
MsgBox "Trace name " & Trace.GetName
C++:
IFwTrace* fw_trace;
. . .
_bstr_t bstr_trace_name;
try
{
bstr_trace_name = fw_trace->GetName();
}
catch ( _com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("FwAnalyzer
client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), _T("FwAnalyzer
client"), MB_OK );
return 1;
}
TCHAR str_trace_name[256];
_tcscpy( str_trace_name, (TCHAR*)( bstr_trace_name) );
SysFreeString( bstr_trace_name );
::MessageBox( NULL, str_trace_name, _T("Trace name"), MB_OK
);