Richard wrote:
OK, Is there any documentation/Examples on how to use XUL Runner for
embedding?
This has got to be the single most frustrating thing about embedding Mozilla
is the incosistency of the documentation. I've seen calls to
NS_InitiEmbedding(), XPCOMGlueStartup(), and XRE_InitEmbedding and I'm just
not really sure which one I should be using.
--Richard
"Benjamin Smedberg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Richard wrote:
I know there's similar posts out there, but I still can't seem to get
embedding to work on windows:
nsresult rv;
nsCOMPtr<nsILocalFile> binDir;
NS_NewLocalFile(NS_LITERAL_STRING("C:\\Mozilla\\mozilla\\mozilla\\dist\\bin"),
TRUE, getter_AddRefs(binDir));
rv = NS_InitEmbedding(binDir, nsnull);
rv is always equal to NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154). Does
anyone have any ideas? The Firefox.exe in that directory seems to run
fine but my embedding app doesn't
Are you using a standard firefox build? You can't embed a standard Firefox
build because it links the component libraries statically to the
executable, where the embedding can't get at them.
XULRunner is the official embedding solution, and should work in these
circumstances if you've linked your code correctly (using frozen linkage
and not internal linkage).
--BDS
I've not had luck with a static builds...I've used shared builds for my
apps and that seems to work fine for me. Maybe recompile mozilla with
ac_add_options --disable-static
ac_add_options --enable-shared
and see if that fixes your NS_ERROR_FACTORY_NOT_REGISTERED problem?
I agree on the frustration on trying to get started with embedding
gecko...I'm still not even sure I'm doing it 100% correct. It works, so
I can only guess that I've done something correct.
Niky Williams
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding