disconnect-module disconnects the DLL associated with a registered module specified by name and registered with register-module.
When disconnecting, if verbose is a stream, then
disconnect-module will send disconnection information to that stream. If verbose is
t, this is interpreted as standard output. The default value of verbose is
If remove is
nil then after disconnection the module will be in the same state as it was when first registered by register-module, that is, lookups for foreign symbols can still automatically reconnect the DLL. If remove is non-nil then name is removed from the list of registered modules. Any foreign symbols which refer to the module will then be reset as unresolved symbols. The default value of remove is
t if it actually disconnected the module, which means it unloaded the foreign module, but has not removed the module. It returns
:removed when it also removed the module. Note that when
disconnect-module is supplied with a non-nil remove, it may still decline to remove the module if there are symbols which are explicitly associated withe the module (for example by by passing
:module to define-foreign-function).
nil is returned if it fails to find the module, or it was not already connected before the call and was not removed by the call.
LispWorks Foreign Language Interface User Guide and Reference Manual - 29 Sep 2017