
A symbol or string specifying the Lisp name the module will be registered under. It is used for explicit look up from the :module keyword of functions such as define-foreign-function . If real-name is not specified then name is taken to be the actual name of the module to connect to.
An option specifying either :automatic or :manual connection to the module.
:automatic automatically connects to a DLL in order to resolve currently undefined foreign symbols.
:manual only connects to the DLL if the symbol to resolve is explicitly marked as coming from this module via the :module keyword of functions such as define-foreign-function .
Overrides the name for identifying the actual DLL to connect to.
The function register-module explicitly informs LispWorks of the presence of a DLL. Functions such as make-pointer and define-foreign-function have a module keyword which can be used to specify which module the function refers to.
The main use of modules is to overcome ambiguities that can arise when two different DLLs have functions with the same name.
The naming convention for the module name can contain the full pathname for the DLL. For example, a pathname such as
#p"C:/MYPRODUCT/LIBS/MYLIBRARY.DLL" "C:\\MYPRODUCT\\LIBS\\MYLIBRARY.DLL" If the module is declared without an extension, " .DLL " is automatically appended to the name. To declare a name without an extension it must end with the period character (" . ").
If a full pathname is not specified for the module, then it is searched for in the following directories (in the given order):
GetSystemDirectory ). For Windows NT the 16-bit system directory ( SYSTEM ) is also searched. GetWindowsDirectory ) PATH variable. In the following example the gdi32 DLL is registered, and then a foreign function called set-cur is defined to explicitly reference the SetCursorPos function in the gdi32 DLL.
(fli:register-module :gdi-dll :real-name "gdi32")(fli:define-foreign-function (set-cur "SetCursorPos")
((x :long)
(x :long))
:module :gdi-dll)