Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
P6API P6ERR P6CCALL P6R::p6CreateInstance ( p6ICom *  pOuter,
const P6R::P6CID cid,
const P6R::P6IID iid,
P6VOID **  ppIface 
)

Creates a single uninitialized instance of the class/interface associated with the specified component ID.

Components use two stage construction, once a component interface is created using this method, you would typically call the interface's initialze() method to complete construction of the component.

Parameters
pOuter[ in ] A pointer to the aggregate objects p6ICom interface. If NULL, then object is not being created as part of an aggregate.
cid[ in ] The component ID of code to be used to create the instance.
iid[ in ] A reference to the interface ID that indicates the interface to be returned.
ppIface[ out ] The address of a variable that, on success, recieves the requested interface pointer, and on failure will be NULL.
Returns
SuccessP6R::eOkAn instance of the requested interface has been created.
FailureP6R::eNotInitializedThe [p6]COM runtime has no been initialized yet. You must call p6Initialize() before calling anything else.
P6R::eNoInterfaceThe interface ID specified could not be found in the specified component.
P6R::eNotFoundThe request component was not found.
P6R::eDllNotFoundThe DLL resgistered for the requested component could not be loaded, or the COM runtime DLL could not be located.
P6R::eDllNotComThe DLL resgistered for the requested component is not a COM component.
P6R::eAccessFaultppIface is NULL.
P6R::eComponentNotFoundThe request component is not found in the registered component DLL.
P6R::eNoMemoryThe was not enough memory to create the requested component instance.