Dll Files

Discussion of Common Lisp
Post Reply
Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Dll Files

Post by Harnon » Sun Nov 23, 2008 4:14 pm

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-)

Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: Dll Files

Post by Harnon » Sun Nov 23, 2008 6:03 pm

Sorry, by accessing I meant actually listing all the functions associated with a dll given the dll file.

dmitry_vk
Posts: 96
Joined: Sat Jun 28, 2008 8:01 am
Location: Russia, Kazan
Contact:

Re: Dll Files

Post by dmitry_vk » Mon Nov 24, 2008 10:40 am

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.

Post Reply