Initializing help system before first use

Functions of the Native Interface

During its initialization, the module receives a pointer of type XPRMnifct. This entity is the address of the table of functions of the Native Interface. Through this table the module can call Mosel functions in order to get information on the objects currently handled by the running model but also change values of these objects as well as call functions and procedures of the model.

Example:

static XPRMnifct mm;
...
mm->dispmsg(ctx,"error message\n")   /* Display an error message */
...

Note that all text strings handled by functions of the Native Interface are encoded in UTF-8. It is therefore required to convert text strings to alternate encodings when exchanging data with other libraries not working with UTF-8. In particular the C library supports either wide characters (wchar_t type) or the default system encoding (that depends on the localisation of the system). These encoding conversions can be achieved with the help of the XPRNLS library (please refer to the XPRNLS Reference Manual for further details).