Hi,

So I finally had the NS_InitEmbedding working, however I had to do the 
following :
rv = NS_InitEmbedding(binDir, nsnull);
f(NS_FAILED(rv))
{
    rv = NS_InitEmbedding(binDir, nsnull);
    if(NS_FAILED(rv))
    {
        return FALSE;
    }
}

THe first call always seemed to fail, but the second one works, However then 
when I do a call to
do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv); It always fails, which is 
probably related to what you wrote below.

However when I include that code in my project I get linker errors trying to 
find NS_GetComponentRegistrar. Any ideas?
currentyly I'm linking in :
embed_base_s.lib
nspr4.lib
profdirserviceprovider_s.lib
xpcomglue.lib
plc4.lib
plds4.lib

and have my preprocessor set to
XP_WIN32
XP_WIN

I took Niky's advice and recompiled Mozilla with
ac_add_options --disable-static
ac_add_options --enable-shared

Thanks,
--Richard

"Olaf" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>I solved my FACTORY error by using the piece of code mentioned at:
>
> http://www.mozilla.org/projects/embedding/embedapiref/embedapi2.html#1099700
>
> The part about automatic component discovery (first block of code). Put
> it before your Init call
> 


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to