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.
These C++ functions serve to initialize and terminate XPCOM. (In an embedding situation, this is usually taken care of by embedding initialization.) Also included are a number of global functions that provide access to the main XPCOM components.
Initializes XPCOM. This function must be called before using XPCOM. The one exception is that you may call
NS_NewLocalFileto create an
nsIFileobject to supply as the bin directory path in this call.extern "C" NS_COM nsresult NS_InitXPCOM2( nsIServiceManager* *result,nsIFile* binDirectory, nsIDirectoryServiceProvider* appFileLocationProvider)
binDirectory:The directory containing the component registry and runtime libraries. You can use
nsnullto use the working directory.
appFileLocProvider:The object to be used by Gecko that specifies to Gecko where to find profiles, the component registry preferences and so on. You can use
nsnullfor the default behaviour.
servMgr:The service manager which was returned by
NS_InitXPCOM2. This will release the service manager. You may pass
| Written by:Ellen Evans | Comments, questions, complaints?