beautypg.com

Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 39

background image


Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual

Initialize Your Application 39

Create Instances of the two objects just declared in the main class of your
application

Create instances of the two declared objects in the Init instance function of the main class in

your application.
(Refer to TestCaptureProject -> TestCaptureProject.cpp -> InitInstance ().)

m_pDataBlocks.CreateInstance(__uuidof(DataBlocks));

m_pIGeneralSrvPtr.CreateInstance(__uuidof(SASGeneralService));

CreateInstance ()
Prototype

HRESULT CreateInstance (CLSID &rclsid, IUnknown * pOuter = 0,

DWORD dwClsContext = CLSCTX_ALL);

Usage

HRESULT hr = DOT CreateInstance (__uuidof ());

Inputs

CLSID is ID of the class object for which an instance needs to be created.

(Use the __uuidof() method to retrieve CLSID of any class.)

** sets default values for the remaining parameters.

Return Value

HRESULT (Success/Failure in terms of instance creation)

Description

Call the CreateInstance() method to create an instance of any class object.