Hi,

I am writing an application embedding Gecko on Windows.
However, I encounter an error at NS_InitEmbedding().

Here is what I wrote.

---
  nsCOMPtr<nsILocalFile> appDir;
  NS_NewLocalFile(NS_LITERAL_STRING("c:\Program Files\mozilla.org\Mozilla"),
  PR_FALSE,getter_AddRefs(appDir));

  DirSvcProvider* provider = new DirSvcProvider();
  NS_ADDREF(provider);
  nsresult rv = NS_InitEmbedding(appDir,provider);
  NS_RELEASE(provider);


  if (NS_SUCCEEDED(rv)) {
    rv = NS_TermEmbedding();
  }
---

DirSvcProvider is a class which I implemented nsIDirectoryServiceProvider.
The method GetFile() returns as follows.

NS_GRE_DIR           : c:\Program Files\Common Files\mozilla.org\GRE\1.5_2003100716
NS_GRE_COMPONENT_DIR : c:\Program Files\Common 
Files\mozilla.org\GRE\1.5_2003100716\components

When I executed the above code,
the next message was shown on the screen, and NS_InitEmbedding() failed(rv=0x80040154).
---
nsNativeComponentLoader: GetFactory(embedcomponents.dll) Load FAILED with error: 
<unknown; can't get error from NSPR>
---

What should I do?

# As for defaults\*, plugins\* and chrome\* and so on,
# I am going to use what is installed by Mozilla.

Regards,
Shoji Urashita

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

Reply via email to