NextPrevUpTopContentsIndex

1.5 Summary

In this chapter an introduction to some of the FLI functions and types was presented. Some examples demonstrating how to interface LispWorks with Windows and C functions were presented. The first example involved defining a foreign function using define-foreign-function to call a C function that converts between Fahrenheit and Celsius. The second involved setting up foreign types, using the FLI macros define-c-typedef and define-c-struct, and defining a foreign function using the FLI macro define-foreign-function, with which to obtain data from the Windows function GetCursorPos . The third example consisted of defining a foreign function to pass data to the Windows function SetCursorPos . A further example illustrated how to manage the allocation of memory for creating instances of foreign objects more carefully using the FLI macro with-dynamic-foreign-objects.


LispWorks Foreign Language Interface User Guide and Reference Manual - 14 Mar 2008

NextPrevUpTopContentsIndex