1 isasanalyzer::getversion – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 10

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

10

3.1.1 ISASAnalyzer::GetVersion


HRESULT GetVersion (

[in] EAnalyzerVersionType version_type,
[out, retval] WORD* analyzer_version );


Retrieves the current version of the specified subsystem.

Parameters

version_type

Subsystem whose version is requested
EAnalyzerVersionType enumerator has the following values:

ANALYZERVERSION_SOFTWARE ( 0 )

software

analyzer_version

Version of the subsystem queried

Return value

ANALYZERCOMERROR_INVALIDVERSIONTYPE –

Specified version type is invalid.

Remarks


Example


WSH:

Set Analyzer = WScript.CreateObject("Lecroy.SASAnalyzer")
SwVersion = Analyzer.GetVersion(0)
MsgBox "Software" & SwVersion

C++:

HRESULT hr;
ISASAnalyzer* poSASAnalyzer;

// create SASAnalyzer object
if ( FAILED( CoCreateInstance (

CLSID_SASAnalyzer,
NULL, CLSCTX_SERVER,
IID_ISASAnalyzer,
(LPVOID *)&poSASAnalyzer ) )
return;


WORD sw_version;
try
{

sw_version = poAnalyzer->GetVersion( ANALYZERVERSION_SOFTWARE );

}
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 buffer[20];
_stprintf( buffer, _T("Software version:%X.%X"), HIBYTE(sw_version),
LOBYTE(sw_version) );

Advertising