9 isasanalyzer::getrecordingoptions – Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 21

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

21

3.1.9 ISASAnalyzer::GetRecordingOptions


HRESULT GetRecordingOptions (

[out, retval] IDispatch** recording_options );

Retrieves the interface for access to the recording options.

Parameters

recording_options

Address of a pointer to the

SASRecOptions

object interface

Return values


Remarks

The SASRecOptions object is created via this method call, if the call was successful.


Example


WSH:

Set Analyzer = WScript.CreateObject("Lecroy.SASAnalyzer")
Set RecOptions = Analyzer.GetRecordingOptions


C++:

HRESULT hr;
ISASAnalyzer* poSASAnalyzer;

// Create SASAnalyzer object.
if ( FAILED( CoCreateInstance(

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


// Open trace file.
IDispatch* rec_opt;

try
{

rec_opt = poSASAnalyzer->GetRecordingOptions();

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

}


// query for VTBL interface

ISASRecOptions* ib_rec_opt;

hr = rec_opt->QueryInterface( IID_ISASRecOptions, (LPVOID *)&ib_rec_opt );

rec_opt->Release();

if( FAILED(hr) )

return;


Advertising