You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
nsIFactory
A class factory allows the creation of
nsISupports
derived 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 bensnull
if no aggregation is requested.
nsresult:
NS_OK
if 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 |