Page 1 of 1

Dll Files

PostPosted: Sun Nov 23, 2008 4:14 pm
by Harnon
I don't know if this belongs in this section, but does anyone know how to access the functions associated with a dll file imported using cffi? Is there a lisp package to do that, or would i have to write a program to parse the dll format automatically, or what? Thx! 8-)

Re: Dll Files

PostPosted: Sun Nov 23, 2008 6:03 pm
by Harnon
Sorry, by accessing I meant actually listing all the functions associated with a dll given the dll file.

Re: Dll Files

PostPosted: Mon Nov 24, 2008 10:40 am
by dmitry_vk
Harnon wrote:I don't know if this belongs in this section, but does anyone know how to access the functions associated with a dll file imported using cffi? Is there a lisp package to do that, or would i have to write a program to parse the dll format automatically, or what? Thx! 8-)

There are some options.
First is the mighty SWIG. It takes a set of header files and produces code for given target language (including lisp with CFFI, but also many others) that makes functions, variables, etc. accessible from the target language.
There is also verazzano/fetter, a project similar to SWIG, but aimed specifically at common lisp and implemented differently.
There is an option to enumerate all symbols in .DLL/.SO, but there is little point: you don't know whether it's a function or variable or something else, you don't types of variable, functions signatures, etc. So using header files is better option.