Joseph T.L. wrote:
I use Gecko in linux ,I have build mozilla successfully,but the code bellowDid you call NS_InitXPCOM2 first?
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?
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
_______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
