
nsIFactory
A class factory allows the creation of
nsISupportsderived components without specifying a concrete base class. This interface is scriptable.Creates an instance of an object that implements the specified IID.
Syntax:
void nsIFactory::createInstance(in nsISupports aOuter, in nsIIDRef iid, [retval, iid_is(iid)] out nsQIResult result)Parameters:
aOuter: Pointer to a component that wishes to be aggregated in the resulting instance. This will bensnullif no aggregation is requested.
nsresult:
NS_OKif the component was successfully created and the interface being requested was successfully returned in result.
Provides the client a way to keep the component in memory until the client is finished with it. The client can call lockFactory(
PR_TRUE) to lock the factory and lockFactory(PR_FALSE) to release the factory.Syntax:
void nsIFactory::lockFactory(in PRBool lock)Parameters:
nsresult:
| Written by:Ellen Evans | Comments, questions, complaints?
Bug 143387 |