Shin guey Wong wrote:
> I would like to load dll and create complex c datatype structure for the
> dll. This can be done with ctypes library in Python.
> So, do ruby has similar library like ctypes?

On Rubinius and JRuby, you can use FFI. I'm hoping someone can do an FFI 
port for MRI so everyone can start using the same library.

Here's a couple articles on FFI. JRuby and Rubinius support roughly the 
same API, though it's probably going to see one or two more changes 
before we release it in JRuby 1.1.4.

http://pluskid.lifegoo.com/?p=370#ffi-doc

http://wiki.jruby.org/wiki/Calling_C_from_JRuby

There also exists the "dl" library on Ruby, but most people I've talked 
to consider it to be a bit too buggy/leaky for use. I don't know if 
that's true.

- Charlie