Hi all,
Before I linked my gecko-embedded app to xpcomglue library, the only thing I need to do for initializing xpcom is call NS_InitEmbedding. But if I use the xpcomglue library (instead of linking directly to XPCOM_LIBS), things become complicated and confused - there are 3 initialization functions: NS_InitEmbedding, GRE_Startup and XPCOMGlueStartup. I don't know which of them should be called and by what order. I've made some tries, but all failed.
I also noticed that both mfcembed & winembed in thunk are not gre-compliance yet. Where can I find any examples of embedding apps using xpcomglue?
Thanks
Kyle
Kyle,
mfcembed and winembed don't do the right thing. however, at some point, the gtk widget will be using the GRE. blizzard knows when.
Take a look at how the mozilla client does it:
startup: http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1594
shutdown: http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1677
Another example that you can look at is the regxpcom client:
http://lxr.mozilla.org/seamonkey/source/xpcom/tools/registry/regxpcom.cpp
Not that to use this you can not have your application link to anything in Gecko. You should only link to xpcom-glue and libs that this requires.
Also, take a look at passed posting on this newsgroup and on XPCOM. Also, look at the xpcom page:
http://www.mozilla.org/projects/xpcom/
If you have further problems after looking at the above examples, please let me know.
Doug Turner [EMAIL PROTECTED]
