1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsXPCOMGlue_h__
8 #define nsXPCOMGlue_h__
15 * The following functions are only available in the standalone glue.
19 * Enabled preloading of dynamically loaded libraries
21 extern "C" NS_HIDDEN_(void) XPCOMGlueEnablePreload();
24 * Initialize the XPCOM glue by dynamically linking against the XPCOM
25 * shared library indicated by xpcomFile.
27 extern "C" NS_HIDDEN_(nsresult
) XPCOMGlueStartup(const char* aXPCOMFile
);
29 typedef void (*NSFuncPtr
)();
31 struct nsDynamicFunctionLoad
33 const char* functionName
;
38 * Dynamically load functions from libxul.
40 * @throws NS_ERROR_NOT_INITIALIZED if XPCOMGlueStartup() was not called or
41 * if the libxul DLL was not found.
42 * @throws NS_ERROR_LOSS_OF_SIGNIFICANT_DATA if only some of the required
43 * functions were found.
45 extern "C" NS_HIDDEN_(nsresult
)
46 XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad
* aSymbols
);
49 #endif // nsXPCOMGlue_h__