Hello one and all,
I'm new to Ruby and i have been trying to get this piece of code to call
MessageBox but can't. I know I am missing something but I don't know
what it is. Any help with this would be greatly appreciated!
Here is the code so far:
···
=============================================================================
require 'Win32API'
LoadLibrary = Win32API.new('kernel32','LoadLibrary','P','L')
GetProcAddress = Win32API.new('kernel32','GetProcAddress','LP','L')
Load = LoadLibrary.call('user32.dll')
Proc = GetProcAddress.call(Load,'MessageBox')
Proc.call(0,"Hello World!","MessageBox in Ruby",0)
I know everything is ok except my "Proc.call". What am I missing?
--
Posted via http://www.ruby-forum.com/.