Craig Kadziolka wrote:
> But the call to do_CreateInstance() always seems to fail, and I tried to
> look on the web and found something which seemed to indicate that it was
> probably due to missing runtime files, since I'm passing in nsnull into
> NS_InitEmbedding.
Passing null basically means that all files are expected to reside
where your executable is.
So you will need to copy the exe to the dist/bin directory that was
build.
Debugging is easier when you do pass a value to NS_InitEmbedding in
debug mode, because then you can simply set the working dir of your VS
project to the dist/bin dir and run your app from within VS.
I have something like this:
#ifdef FIXED_LOCATION
nsCOMPtr<nsILocalFile> binDir;
NS_NewLocalFile(nsEmbedString(L"C:\\dist\bin"), PR_TRUE,
getter_AddRefs(binDir));
rv = NS_InitEmbedding(binDir, nsnull);
#else
rv = NS_InitEmbedding(nsnull, nsnull);
#endif
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding