From: Dave Burt Date: 2005-05-31T07:05:26+09:00 Subject: Re: WIN32API "Park Heesob" wrote... > Hi, > ----- Original Message ----- > From: "Dave Burt" >> >> "Wolfgang" wrote: >>> Hello Brian, >>> >>> up to now I only have this in ruby: >>> >>> require 'Win32API' >>> win = Win32API.new("dlltest.dll","DLL_WOOD",[],'L') >>> somevalues = win.call() >>> print somevalues >>> >>> the self made dll should return at the moment a fixed value (for >>> testing). >>> I tried this with an integer, than it works. As soon I define the >>> variable >>> in fortran as real, I get this nice numbers. >>> >>> Wolfgang >> >> Hi! >> >> The last parameter to Win32API.new is the type of the return value. If >> your >> DLL function returns a long integer, 'L' is correct. If you change the >> DLL >> so that the function returns a float or a double, you will have to change >> that last parameter to 'F' or 'D': >> > As far as I know, You can't use 'F' or 'D' paramenter in Win32API. > > ... You're right. I was thinking about Ruby/DL. Maybe, Wolfgang, you could use that instead: # untested code require 'dl' dl = DL.dlopen = "dlltest.dll" func = dl["DLL_WOOD", "D"] somevalues = func.call p somevalues Hope this helps more that my last post :) Cheers, Dave