Antoine Julien wrote:

Is it possible to access a Mozilla component from an external application?

Let's say I would like to have an application that interacts with Mozilla. I would then create a component that would do the Mozilla related stuff, and another application (C++) that could communicate with the component to do its stuff. Is such a communication between applications possible with XPCOM? I know it is with COM so I was wondering.

I suspect I would need to retrieve my reference to the component with the nsIServiceManager::getServiceByContractID method, but then I'd need to have access to the nsIServiceManager (or nsIComponentManager for Instances instead of Services). So the whole question becomes basically: can one access the service/componenet manager from outside Mozilla?
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom


i'm not exactly sure what you are asking. are you asking:

1) can i do something like DCOM with XPCOM? (i.e., where i interact with a XPCOM component remotely via some IPC mechanism)

or,

2) can i load a XPCOM component into my application and use it?

if #2, then yes (sort of). just follow the instructions in:

http://www.mozilla.org/projects/xpcom/book/cxc/

where it talks about loading the GRE. you basically need to either link to xpcom.dll or you need to explicitly load it at runtime. the XPCOM "glue" layer assists in the second option. using XPCOMGlueStartup("c:\path\to\xpcom.dll"), you can load the GRE and then interact with any XPCOM components from within your application.

if #1, then you are out-of-luck. there isn't any support for that yet.

--darin
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to