"Benjamin Smedberg" <[EMAIL PROTECTED]>
??????:[EMAIL PROTECTED]
> Brendan Eich wrote:
> > Joseph T.L. wrote:
> >
> >> I use Gecko in linux ,I have  build mozilla successfully,but the code
> >> bellow
> >> always fail,this is the first code executed in my program.
> >> Is there something
> >> need be done before I call NS_NewNativeLocalFile?
> >>
> >>    nsCOMPtr<nsILocalFile> mreAppDir;
> >>    rv =
> >>
NS_NewNativeLocalFile(nsDependentCString("/root/mozilla/dist/bin/testqt.out"
> >>
> >> ), TRUE, getter_AddRefs(mreAppDir));
> >> NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create mreAppDir localfile");
> >>              ^^^^^^^^^^^^^^^^^always fail,why?
> >>
> > Did you call NS_InitXPCOM2 first?
>
> Well in fact you're supposed to be able to call NS_NewNativeLocalFile
> before NS_InitXPCOM2 (so that you can have a local file to pass to
> initxpcom).  What are you linking against? If you're using the
> standalone xpcom glue (recommended) you need to call XPCOMGlueStartup.
>
> --BDS
>

Thank you! What I just need is  to call XPCOMGlueStartup. thanks very much


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

Reply via email to