Re: Embedding Gecko/XULRunner

Benjamin Smedberg <[email protected]>
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 2/16/2011 11:28 PM, Peter Tsonev wrote:
> My understanding of the embedding process (one of the possible ways) 
> is that 1) GRE is found,
> 2) XPCOMGlue is started up, 3) XUL functions are initialized, 4) 
> XRE_InitEmbedding is called.
Yes. Note that I strongly recommend that you never try to use a "system 
XULRunner". Always ship XULRunner with your code (e.g. in a xulrunner/ 
subdirectory) and look for it in that well-known location. DLL-hell will 
result otherwise.

> Is this correct?
>
> I am able to execute all of the above correctly. Then I proceed to get 
> nsIWebBrowser via do_CreateInstance and
> nsIWebNavigation via do_QueryInterface. Then I load a URL through the 
> latter. It is this loading that fails.
> Please refer to the code below. Everything I described is attempted by 
> the code.
You haven't initialized the webbrowser yet. I believe that requires 
QIing it to nsIBaseWindow and calling create() (and maybe initWindow() 
before that) on it.

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.