From: Jian Lin Date: 2009-11-15T03:41:46+09:00 Subject: Re: How to do a getPixel on Win32 using Ruby? I thought it would be something like user32 'GetPixel', ['L', 'I', 'I' ], 'L' as in ----------------------------------------------------------- require 'Win32API' def user32(name, param_types, return_value) Win32API.new 'user32' , name, param_types, return_value end set_cursor_pos = user32 'SetCursorPos', ['L' , 'L' ], 'I' mouse_event = user32 'mouse_event', ['L' , 'L' , 'L' , 'L' , 'L' ], 'V' get_pixel = user32 'GetPixel', ['L', 'I', 'I' ], 'L' get_pixel.call 0, 0, 0 ----------------------------------------------------------- but there is an error giving out get_pixel.rb:4:in `initialize': GetProcAddress: GetPixel or GetPixelA (RuntimeError) from get_pixel.rb:4:in `new' from get_pixel.rb:4:in `user32' from get_pixel.rb:10 -- Posted via http://www.ruby-forum.com/.