1. Beginner
 Jan 3, 4:43 pm   show options

Newsgroups: comp.lang.ruby
From: "Beginner" <sman... / ueidaq.com> - Find messages by this author
Date: 3 Jan 2006 13:43:15 -0800
Local: Tues, Jan 3 2006 4:43 pm
Subject: New to Ruby needs help
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

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