Much thanks for the quick reply and source snippet.  I found my fault in
what I was missing.  I downloaded the mozilla source and compiled it (2 1/2
hrs later), the mozilla/dist/bin had all the elements that I needed to get
this started.  With pointing the first parameter of NS_NewLocalFile() to the
Mozilla bin directory it fired right up.  I DID have to add the
mozilla/dist/bin dir to my PATH variable so it could find the XPCOM.dll
file.  YA! First step in getting off that blasted IE COM object!

Nik


"Yogish Baliga" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> May be this will help
>
> Assumption: /usr/X11R6/lib/firefox is having components, chrome, defaults,
extensions, greprefs, icons, plugins
>
>    nsCOMPtr<nsILocalFile> nsFile;
>    NS_NewLocalFile(NS_LITERAL_STRING("/usr/X11R6/lib/firefox"), TRUE,
getter_AddRefs(nsFile));
>
>    nsresult rv = NS_InitEmbedding(nsFile, nsnull);
>    if (rv != NS_OK) {
>      cerr << "Embedding failed.." << rv << endl;
>      exit(1);
>    }
>
>
> Niky Williams wrote:
> > Please bear with me here, I am a total nubie to the Gecko SDK.  I
currently
> > have an app that uses the IE COM control...works okay..but I REALLY want
to
> > get off of IE and use the Gecko engine.  I have a fairly okay
understanding
> > of MS COM and have been reading what I can get my hands on for XPCOM.
My
> > App is not going to be a web browser, I just need the Gecko engine to
render
> > the HTML for me and for me to be able to grab events from buttons
clicked on
> > the HTML.  I've been looking for about a week now on getting this setup
and
> > working...I think once I get the basic stuff working here I'll be okay.
I
> > DLed the Gecko SDK, set up a very basic C++ app that did nothing but
call
> > NS_InitEmbedding(nsnull, nsnull).  I see the first param is the Mozilla
Bin
> > Directory, but docs said both can be nsnull.  I think read somewhere
that
> > I'll need to compile the Mozilla source for certain embedding
libraries...is
> > this true or does the Gecko SDK hold everything I need?  Anyways, I get
back
> > the error "NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)".  So, I'm
missing
> > some XPCOM lib that isn't reg'ed? If I just call NS_InitXPCOM2(nsnull,
> > nsnull, nsnull) it goes okay, but as soon as I try and create a Web
Browser
> > instance (CreateInstanceByContractID() via nsIComponentManager) I get
the
> > same error.  I'm just needing some good guidance and confirmation of
some
> > things here as to how to get started.  Excuse my ignorance and much
thanks
> > in advance!
> >
> > Nik
> >
> >
> > _______________________________________________
> > mozilla-embedding mailing list
> > mozilla-embedding@mozilla.org
> > http://mail.mozilla.org/listinfo/mozilla-embedding
> >
>


_______________________________________________
mozilla-embedding mailing list
mozilla-embedding@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to