Itrace::getname – Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 58

Advertising
background image

Teledyne LeCroy

SASTrace Object

52

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

ITrace::GetName

HRESULT GetName (

[out, retval] BSTR* trace_name );

Retrieves the trace name.

Parameters

trace_name

Name of the trace

Return Values

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("Lecroy.SASAnalyzer

")

CurrentDir = Left(WScript.ScriptFullName,
InstrRev(WScript.ScriptFullName, "\"))
Set Trace = Analyzer.MakeRecording (CurrentDir &

"Input\test_ro.sac")

MsgBox “Trace name “ & Trace.GetName

C++:
ISASTrace* sas_trace;

. . .

_bstr_t bstr_trace_name;

try
{
bstr_trace_name = sas_trace->GetName();
}
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;
}
TCHAR str_trace_name[256];

Advertising