
AutomationAPIforTeledyneLeCroySAS/SATAProtocolSuite 7
SASAnalyzerObject
TeledyneLeCroy
ISASAnalyzer::GetVersion
HRESULT GetVersion (
[in] EAnalyzerVersionType version_type,
[out, retval] WORD* analyzer_version );
Retrievesthecurrentversionofthespecifiedsubsystem.
Parameters
version_type Subsystemwhoseversionisrequested
EAnalyzerVersionTypeenumeratorhasthefollowingvalues:
ANALYZERVERSION_SOFTWARE ( 0 )Software
analyzer_version Versionofthesubsystemqueried
ANALYZERVERSION_SOFTWARE:UpperByte=Software
MajorVersion,LowerByte=SoftwareMinorVersion
ReturnValue
ANALYZERCOMERROR_INVALIDVERSIONTYPE Specifiedversiontypeisinvalid.
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;
}
Comentarios a estos manuales