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.


TOC PREV NEXT INDEX

Embedding Gecko API


nsIComponentManager


This interface accesses the mechanism used to organize and create objects in XPCOM. This interface is scriptable.

Methods
getClassObject

Returns the factory object that is used as an intermediary in the creation of instances of the class represented by the CID aClass.

Syntax:

void nsIComponentManager::getClassObject(
	in nsCIDRef aClass,in nsIIDRef aIID, 
	[iid_is(aIID),] out nsQIResult result)  

Parameters:

aClass: The class ID of the class whose factory is being requested.
aIID: The interface ID of the interface that the factory's class implements.
result: [out] The reference to return.

nsresult:

NS_OK if successful.
getClassObjectByContractID

Returns the factory object that is used as an intermediary in the creation of instances of the class represented by the contract ID string.

Syntax:

void nsIComponentManager::getClassObjectByContractID(
	in string aContractID, 
	in nsIIDRef aIID,
	[iid_is(aIID),retval] out nsQIResult result) 

Parameters:

aContractID: The contract ID of the class whose factory is being requested.
aIID: The interface ID of the interface that the factory's class implements.
result: [out] The reference to return.

nsresult:

NS_OK if successful.
createInstance

Creates an instance of the class indicated by the class ID and returns the interface indicated by the interface ID.

Syntax:

void nsIComponentManager::createInstance(
	in nsCIDRef aClass,in nsISupports aDelegate,
	in nsIIDRef aIID,
	[iid_is(aIID),retval] out nsQIResult result)  

Parameters:

aClass: The class ID of the requested class.
aDelegate: Used for aggregation.
aIID: The ID of the requested interface.
result: [out] The reference to return.

nsresult:

NS_OK if successful
createInstanceByContractID

Creates an instance of the class indicated by the contract ID string and returns the interface indicated by the interface ID.

Syntax:

void nsIComponentManager::createInstanceByContractID(
	in string aContractID,in nsISupports aDelegate,
	in nsIIDRef aIID,
	[iid_is(aIID),retval] out nsQIResult result) 

Parameters:

aContractID: The contract ID of the requested class.
aDelegate: Used for aggregation.
aIID: The ID of the requested interface.
result: [out] The reference to return.

nsresult:

NS_OK if successful

Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX