Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 117

Advertising
background image

 

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

111

SASTraceErrors Object

Teledyne LeCroy

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 all_errors[2048];
_stprintf( all_errors, _T("Errors: ") );

try
{
long errors_count = analyser_errors->GetCount();
long analyzer_error;
if ( !errors_count )
{
_tcscat( all_errors, _T("none") );
}
for ( long i=0; i<errors_count && i<2048/32; i++ )
{
analyzer_error = analyser_errors->GetItem(i);
TCHAR cur_error[32];
_stprintf( cur_error, _T(" %ld"), analyzer_error );
_tcscat( all_errors, cur_error );
}
if ( i>2048/32 )
_tcscat( all_errors, _T(" ...") );
}
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;
}

analyser_errors->Release();

::SetWindowText( m_hwndStatus, all_errors );

Advertising