All Manuals > Foreign Language Interface User Guide and Reference Manual > 7 Function, Macro and Variable Reference

disconnect-module Function

Summary

Disconnects the DLL associated with a registered module.

Package

fli

Signature

disconnect-module name &key verbose remove => result

Arguments
name
A symbol or string.
verbose
nil, t or an output stream.
remove
A boolean.
Values
result
nil, t or :removed.
Description

The function 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 nil.

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 nil.

disconnect-module returns 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.

See also

register-module


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58