I made a start on writing an FFI howto at:
http://www.reid-consulting-uk.ltd.uk/docs/ffi.html
It is very rough, doesn't answer your specific question, has many
typos and omissions, etc. but some of the links in the Tips and Tricks
section (section 4) might help.
To answer your question
From: Antony Courtney [mailto:[EMAIL PROTECTED]]
While the FFI spec. is excellent, I'd really like to see a companion
document with real examples of how to use the FFI for the
easy, obvious
kinds of library interfacing tasks that are likely to arise
in practice.
There are quite a