New to Ruby needs help

B

Beginner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top