2 ianalyzererrors::get_count, Ianalyzererrors::get_count – Teledyne LeCroy FireInspector Automation Application Programming Interface User Manual

Page 67

Advertising
background image

63

FireInspector Automation User’s Manual

CATC

Version 1.0

2.6.2

IAnalyzerErrors::get_Count

Retrieves the number of Analyzer errors. Use IAnalyzerErrors::get_Item to retrieve the
actual errors.

Syntax

HRESULT get_Count(

[out, retval] long* number_of_errors );

Parameters

number_of_errors

points to long value where number of elements in the

collection is retrieved

Return values

Remarks

Example

WSH:

C++:

IFwTrace* fw_trace;

. . .

IAnalyzerErrors* analyzer_errors;

try

{

analyzer_errors =

fw_trace->AnalyzerErrors(error_type).Detach();

}

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 all_errors[2048];

_stprintf( all_errors, _T("Errors: ") );

try

{

long errors_count = analyzer_errors->GetCount();

long analyzer_error;

if ( !errors_count )

{

_tcscat( all_errors, _T("none") );

}

for ( long i=0; i<errors_count && i<2048/32; i++ )

Advertising