Creating sas objects, Creating sas objects in trainer mode – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual
Page 182
Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual
Creating SAS Objects in Trainer Mode 182
Creating SAS Objects
To create SAS objects:
1. Create GeneralService in the first lines of your application.
2. Call two methods of GeneralService:
3. Create object(s). For example, if you want to work with Capture Project, you should
create ISerialSCSICaptureProject (see
4. Call methods of your created object(s).
5. At end of your application, call two methods of the GeneralService object:
Creating SAS Objects in Trainer Mode
To create SAS Objects to use in the Trainer module API.
1. Create SASAPISrvs in the first line of your application.
2. Call the GetSASGeneralServicePtr method of the SASAPISrvs class to get the dispatch
interface pointer of GeneralService.
3. Call the QueryInterface method of the dispatch interface to get the ISASGeneralService
interface pointer:
m_SASAPIPtr.CreateInstance(__uuidof(SasAPISrvs));
LPDISPATCH GeneralServerDispatch = NULL;
SASAPIPtr->GetSASGeneralServicePtr(&GeneralServerDispatch);
GeneralServerDispatch->QueryInterface(__uuidof(ISASGeneralService),
(void**)&m_pGeneralSrvPtr);
4. Do the other steps as in section 4. However, do not create any object by directly calling
“CreateInstance”. The SASAPISrvs interface has some methods to create objects and deliver
their dispatch interface. You should call these methods and then call QueryInterface to get
interfaces.