An instance of XPCOM component can be obtained by XPCOM.instance methods.
file = XPCOM.instance("@mozilla.org/file/local;1", "nsILocalFile")
|
You can also ask a service for the ServiceManager.
category_manager =
XPCOM::ServiceManager.getService("@mozilla.org/categorymanager;1",
"nsICategoryManager")
|
Methods defined nsISupports are treated specially.
QueryInterface accepts interface name as well as iid. It returns nil if the reciever does not support specified interface (rather than raising an exception).
not visible from Ruby
not visible from Ruby