Loads an NLM or other module.
#include <netware.h> int LoadModule ( scr_t scrID, const char *path, unsigned long options);
(IN) Points to a screen handle.
(IN) Points to the file to load.
(IN) Specifies the options to use at load time. Make sure you do not set any undefined bits. For a list of supported options, see Section 30.1, Load Options.
If success, returns 0. Otherwise, returns one of the following error codes:
Normally, you should call NXVmSpawn or dlopen, rather than LoadModule. If the module to be loaded in one that provides interfaces to other modules, such as a library, call dlopen instead of LoadModule.
If you want a tighter relationship with the loaded NLM (including the ability to shut down the NLM you have loaded), call NXVmSpawn instead of LoadModule.
If you call LoadModule from ring 3, LoadModule works respective to that address space.
LoadModule is based on the semantics of the search path at the console. Even if the calling NLM exists in a subdirectory, there is no guarantee that NLM applications in the same directory can be loaded by calling LoadModule. You must supply a full path or work with a search path. If the search path does not work, you can change it by calling AddSearchPathAtEnd, DeleteSearchPathAtEnd, or InsertSearchPath, but changing the search path might affect the way other features behave on your server.