"Wolfgang" <wollez / gmx.net> 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': # function returns a double win = Win32API.new("dlltest.dll","DLL_WOOD",[],'D') Cheers, Dave