#define XP_WIN 1
#define XPCOM_GLUE 1
#include <windows.h>
#include <string>
#include "xpcom-config.h"
#include "nsCOMPtr.h"
#include "nsILocalFile.h"
#include "nsStringAPI.h"
#include "xulapp/nsXULAppAPI.h"
#include "nsXPCOMGlue.h"
#include "xulapp/nsXULAppAPI.h"
#include "nsEmbedCID.h"
#include "nsComponentManagerUtils.h"
XRE_InitEmbeddingType XRE_InitEmbedding;
XRE_TermEmbeddingType XRE_TermEmbedding;
#pragma comment ( lib, "xpcomglue.lib" )
int APIENTRY WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
nsDynamicFunctionLoad nsFuncs[] = {
{"XRE_InitEmbedding", (NSFuncPtr*)&XRE_InitEmbedding},
{"XRE_TermEmbedding", (NSFuncPtr*)&XRE_TermEmbedding},
{0, 0}
};
TCHAR xpcomPath[_MAX_PATH] = TEXT("./xpcom.dll");
rv = XPCOMGlueStartup ( xpcomPath );
rv = XPCOMGlueLoadXULFunctions ( nsFuncs );
rv = XRE_InitEmbedding ( 0, 0, 0, 0, 0 );
....
}
(MSVC Express 2005)
in the above code 'XRE_InitEmbedding' failes with the result
0x80070057
i'm new to the mozilla embedding. what did I miss?
the startup folder of the application is the 'bin' directory of the
XULrunner SDK.
'xul-runner.exe application.ini' <a href="http://developer.mozilla.org/
en/docs/Getting_started_with_XULRunner">from this tutorial<a> shows a
'Hello world' window
thanks in advance
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding