IFXCreateComponent |
This class creates an instance of an IFXCOM-Lite object and returns a pointer to one of its interfaces.
When to Use:
Use IFXCreateComponent whenever you need to create an IFXCOM-Lite object. Use of this function is the ONLY correct way to create an IFXCOM-Lite component. Using new or delete will result in compilation errors. This function is used by all clients of IFXCOM-Lite components.
IFXCreateComponent is used for both singleton and non-singleton objects. Singleton objects have only one instance throughout the application. The first call to IFXCreateComponent will create the singleton object, and subsequent calls will return references to that object without creating new instances. Calling IFXCreateComponent for a non-singleton object will always create a new instance of that object.
Parameters:
|
componentId |
Points to a valid IFXREFCID structure of the CID of the component to be created |
|
interfaceId |
Points to a valid IFXREFIID structure of the IID of the component to be created |
|
ppInterface |
Points to an IFXUnknown interface pointer. ppInterface must not be NULL, but should point to a NULL pointer. The pointer it points to will be initialized with the object created, or in the case of singleton objects, the object retrieved. |
Return Values:
If successful, IFX_OK; otherwise, it will return one of the following values: IFX_E_COMPONENT, IFX_E_INVALID_POINTER, IFX_E_OUT_OF_MEMORY or IFX_E_UNSUPPORTED.
Comments:
IFXCreateComponent performs an implicit AddRef if successful.
§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.