Isasanalyzer::getversion – Teledyne LeCroy SAS_SATA Automation API manual User Manual

Page 13

Advertising
background image

 

Automation API for Teledyne LeCroy SAS/SATA Protocol Suite

7

SASAnalyzer Object

Teledyne LeCroy

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

ANALYZERVERSION_SOFTWARE: Upper Byte = Software 
Major Version, Lower Byte = Software Minor Version

Return Value

ANALYZERCOMERROR_INVALIDVERSIONTYPE Specified version type is invalid.

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;
}

Advertising