« XPCOM API Reference
Summary
This method returns a reference to a particular XPCOM service given the ClassID of the service.
void getService(
in nsCIDRef aClass,
in nsIIDRef aIID,
[iid_is(aIID),retval] out nsQIResult aResult
);
Parameters
- aClass
- [in] The ClassID of the service that is being requested.
- aIID
- [in] The interface type to be returned.
- aResult
- [out] The resulting interface pointer.
Exceptions Thrown
- NS_ERROR_FACTORY_NOT_REGISTERED
- Indicates that the specified class is not registered.