From: Raphael Clancy Date: 2002-01-31T14:13:43+09:00 Subject: Win32API and dll programming in windows Can anyone recomend a good reference on Win32API and dll programming in general? I'm trying to get my head aroud it, but can't seem to make things work. I decided to start out with a very simple function, which had the signature: float GetDllVersion (); Looking at tha I can see that it doesn't want any arguments, and should return a float. Knowing that I try to call it like so: dllVer = Win32API.new("NameOfDll", "GetDllVersion", [], 'n') I use [] for the import array 'cause I'm not passing anything to the dll, and 'n'for the export because the function should return a number. Then I call the function like so: vers = dllver.call() puts "version: #{vers}" I run it, and get "version: 0", and I know from the documentation that it should be version 1.03. the 0 makes me think that 'vers' never gets anything put in it at all. Perhaps I'm missing the point of the import array? should I be passing a 4 byte array to the dll, and letting it put it's answer in that? did I forget to wave the dead chicken? I'm going to go beat on this some more, but any help would be apreciated! Thanks, R.