Checking the Dynamic Link Library Version
The include directory on the JADE release medium contains the header file jombuild.h, which provides the defines that enable you to perform build and runtime version checking.
The define MAKEMODULEVERSIONFUNC is used to construct a module version‑specific function name.
Each JADE Dynamic Link Library (DLL) exports a function named using MAKEMODULEVERSIONFUNC; for example, the function name exported by jomutil.dll is "moduleVersion_jomutil_7_1_02".
Importers of the JADE DLL can use the following to ensure that the importing executable, the jomutil.lib, and the jomutil.dll are consistent.
Declaration:
extern "C" DllImport int JOMAPI MAKEMODULEVERSIONFUNC(jomutil)();
Invocation:
int jomutilpatch = MAKEMODULEVERSIONFUNC(jomutil)();
If the jombuild.h file version included by the user source does not match the jomutil.lib, the compile‑time linker raises an error; for example:
mysource.obj : error LNK2019: unresolved external symbol __imp_moduleVersion_jomutil_7_0_7 referenced in function MyVersionChecker
At run time, if the importer version and the jomutil.lib version do not match jomutil.dll, the Dynamic Linker raises the following.
The procedure entry point moduleversion_jomutil_7_0_8 could not be located in the dynamic library jomutil.dll.
The importing executable should contain a version‑check function invocation and declaration for each statically‑linked JADE DLL; for example, jomutil.dll and jom.dll.