Hello

You shoud use XRE_InitEmbedding with a different prototyping.

typedef nsresult (__cdecl *XRE_InitEmbeddingType)(nsILocalFile
*aLibXULDirectory,
                            nsILocalFile *aAppDirectory,
                            nsIDirectoryServiceProvider
*aAppDirProvider,
                            nsStaticModuleInfo const
*aStaticComponents,
                            PRUint32 aStaticComponentCount);

XRE_InitEmbeddingType XRE_InitEmbedding = 0;
XRE_TermEmbeddingType XRE_TermEmbedding = 0;
XRE_NotifyProfileType XRE_NotifyProfile = 0;
XRE_LockProfileDirectoryType XRE_LockProfileDirectory = 0;

    // load XUL functions
    nsDynamicFunctionLoad nsFuncs[] = {
            {"XRE_InitEmbedding", (NSFuncPtr*)&XRE_InitEmbedding},
            {"XRE_TermEmbedding", (NSFuncPtr*)&XRE_TermEmbedding},
            {"XRE_NotifyProfile", (NSFuncPtr*)&XRE_NotifyProfile},
            {"XRE_LockProfileDirectory",
(NSFuncPtr*)&XRE_LockProfileDirectory},
            {0, 0}
    };

    rv = XPCOMGlueLoadXULFunctions(nsFuncs);

Regards
Alain

On 17 fév, 10:29, wiget <[email protected]> wrote:
> On 22 Sty, 00:08, Kubas <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I am trying to compile new embedding API sample test application that
> > I got from here:https://wiki.mozilla.org/Embedding/NewApi
>
> > Compilation results in such errors:
> > Error   64      error C2146: syntax error : missing ';' before identifier
> > 'XRE_InitEmbedding2'    c:\!code\dev projects\mozembed\common
> > \embeddingsetup.cpp     72
> > Error   50      error C2039: 'ToProvidedString' : is not a member of 'nsID' 
> >     c:
> > \!code\lib\xulrunner-sdk\include\nsnetutil.h    1690
>
> > I can't find any information on google about "XRE_InitEmbedding2Type"
> > and it's not defined anywhere in Gecko SDK include files.
> > I have tried all versions of Gecko SDK available 
> > here:https://developer.mozilla.org/En/Gecko_SDK
> > All cause similiar problems.
>
> > Can anyone help?
>
> XRE_InitEmbedding2Type is introduced in (not yet released) Gecko 2.0.
> You can fetch prerelease 
> fromhttp://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-mozil...

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

Reply via email to