External modules library

As the libraries are implemented as DLL's, and this allows linking between seperate pieces of code, we have provided special support for external modules. This can be particularly useful for large programs, so that the less-used features don't always have to be loaded, and also for parts of which several versions could be used depending on configuration (e.g. printer drivers).

External modules always start with an identifier string, which is used to make sure that the external module is valid for the application. External modules should be built using the -sxmod options which has to be passed to the linker (to specify the startup file), and have to be post-processed by mkxmod (which amongst other things sets the identifier string).

MODULELoad
Load an external module. This functions returns the base of "init", which can be either a function or a data structure (as chosen by the designer of the external modules of given type). The function needs the filename, searchpath and module identifier (which should preferably be unique - module identifiers can be registered with PROGS to prevent clashes).
MODULELoadFor
Same as MODULELoad, but with explicit control over the ownership of the module which is loaded.

PROGS, Professional & Graphical Software
last edited February 3, 1996