Subject: Re: [ruby-ffi] Link to non-windows dlls |
From: Luis Lavena |
Date: 10/23/10 9:46 AM |
To: ruby-ffi@googlegroups.com |
On Fri, Oct 22, 2010 at 8:33 PM, kvberge <kvandenberge@gmail.com> wrote:
Is there a trick to using FFI and the non-windows api dll's? I am attempting to link to a custom usb dll that is known to work (currently using wrapper created from swig and using ruby 1.8.6). I am now attempting to run ruby 1.9.2 and FFI seemed like a simpler solution than worrying about using swig. I should also note that I am on windows 7 and ran the ruby one click installer for windows. When running the script I get this error: Any advice? If you need more information let me know.
Please show the code, we need to look at the code to be able to see what are you talking about. Perhaps even reproduce it. Some non-microsoft DLLs uses cdecl as calling convention instead of stdcall, which is the default on Windows. Please provide every single piece of code and information for us to be able to reproduce the problem. Linsk to download of the DLL, the code that generates the issue, any documentation. That will really help us help you.-- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry