From: Glen Stampoultzis Date: 2000-09-03T13:29:04+09:00 Subject: [ruby-talk:4756] Re: Which distribution (was Windows registry) I have downloaded two distributions and neither of them have an ext directory. My files are: rbcw145.zip ruby-1.6.0-20000829-i386-cygwin.tar.gz To add to the confusion those two distributions contain totally different directory structures. Which distribution should I be using and why are there so many spread around different pages? As a new user I'm finding the installation procedure somewhat confusing. There appear to be all sorts of required DLL's that are separate from the main distribution file. Is there a single download available that includes all necessary files packaged into an install program? Thanks for your help, Glen ----- Original Message ----- From: Michael Neumann To: Glen Stampoultzis Sent: Thursday, 31 August 2000 7:37 Subject: Re: [ruby-talk:4727] Re: Windows registry > > From: "Glen Stampoultzis" > > > > Thanks Michael, > > > > I don't know if it's possible to use OLE to access the registry. I should > > be able to figure out the C Win API call. Is there any documentation to > get > > me started on how to use the ruby Win32API module? I looked but couldn't > > find anything. > > There are two examples in the directory "ext/Win32API", point.rb and > getch.rb. > > Here's a short description: > > ####################### > > require 'Win32API' > > getCursorPos = Win32API.new("user32", # function is in > user32.dll > "GetCursorPos", # > function-name > ['P'], > # the argument of that function is a pointer > 'V') > # the function returns void (nothing) > > # Now you can call the function. > > lpPoint = " " * 8 # reserve space for two longs (8 bytes) > getCursorPos.Call(lpPoint) # the function returns 2 longs which are stored > at the adress of the pointer > > # Now lpPoint contains two longs. > > x, y = lpPoint.unpack("LL") # unpack the two longs into variables > > ####################### > > hope this helps > > > Michael > > > > >