Forum: Ruby New to Ruby needs help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
47e8d8a46c78162a28fb85af179062ef?d=identicon&s=25 Beginner (Guest)
on 2006-01-03 22:50
(Received via mailing list)
Dear Gurus,

I would like to call a Win32API dll from ruby and I did the following:

require 'Win32API'
dwtest = "" * 8
shell1=Win32API.new("my.dll", "myfunc",['P','P','P'],'L')

myfunc takes 3 parameters, &dwerror, &dwnum, &dwtest. Return value is 0
or 1.

I would like to print or test "&dwtest" which is the 3rd parameter, but
I don't know what mistake am I doing, it never prints the right value.
I even did "unpack" using dwtest.unpack('L').

Could you pls modify the above code?

Any help is appreciated.

thx,
Mankan
This topic is locked and can not be replied to.