jml wrote:
Met more problems when I try to do more things.

As I don't know how to get the webbrowser component, I guess I need call nsIComponentRegistrar.autoRegister() with parameter, then I noticed it require a nsIFile. Good thing is that XPCOM.dll include a method of NS_NewLocalFile(). The NS_NewLocalFile() method require me to pass in an nsAString, then I am in trouble -- how could I create an nsAString in Java code?
>
Then I noticed there is a nsIStringService, if I can pass a pointer that points to a buffer in ascii or unicode format, then I should be able to get a nsAString or nsACString from the nsIStringService. If this is possible, I can still move on with only xpcom.dll, and not including other mozilla include file or lib file.
the nsIStringService is not complete or active. If you require this class, lets talk about it. I was going to enable it, but i had some second thoughts.

So my question here is: how can I get an nsIStringService? What must I do before I be able to get it? Must I use nsAString or nsACString before I get nsIStringService?
In your code, you are going to have to implement the AString/ACString. \Take a look at the nsEmbedString and nsEmbedCString in mozilla/xpcom/glue/standalone. This is a very simple class that implements the abstract string classes.

Doug Turner
[EMAIL PROTECTED]




Reply via email to