George,

I'm no expert at the embedding API....I'm just learning myself. But it
seems to me that mfcembed is looking for the components it needs
within the directory local to the executable. See this line?

NS_NewNativeLocalFile(nsDependentCString(T2A(path)), TRUE,
getter_AddRefs(mreAppDir));

And path is set from a call to GetModuleFileName.

It later uses mreAppDir in the embedding initialization. If it can't
find the components directory and the stuff in it, it craps out every
time. This seems to be the case with all of the embedding examples.

I'm betting if you modify it so mreAppDir gets set to the directory
for the MRE or even the unzipped mozilla binary path it'll work just
fine. Maybe via an environment variable? 

-Shane

On Mon, 03 Jan 2005 21:40:38 +0800, George Zhang
<[EMAIL PROTECTED]> wrote:

>Hi all,
>
>I'm trying to embed Mozilla in an application basing mfcembed.exe, and 
>found that mfcembed.exe in mozilla 1.7 or 1.8a4 can't run outside of GRE 
>directory or the unzipped mozilla binary path. mfcembed.exe is included 
>in a .zip mozilla binary, if it's unzipped, mfcembed.exe runs 
>successfully under that directory. But it can't run if copied outside 
>that directory. It also runs if copied to the GRE directory installed by 
>an installable .exe file. But it fails outside that directory either.
>
>I tried to look into the code but didn't find the root cause. There is a 
>reported bug but there is no update:
>https://bugzilla.mozilla.org/show_bug.cgi?id=274671
>
>I saw this problem raised several times somewhere else, could anybody 
>give any hints?  I would try to work on a patch if I get the right 
>direction.
>
>Thanks in advance !
>
>-George.
>

_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to