# New to Ruby needs help

**URL:** <https://www.ruby-forum.com/t/new-to-ruby-needs-help/51588>\
**Category:** Ruby\
**Created:** [January 3, 2006, 10:50pm UTC](https://www.ruby-forum.com/t/new-to-ruby-needs-help/51588 "2006-01-03T22:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e495f1/32.png) [@beginner](https://www.ruby-forum.com/u/beginner)\
**Post date:** [January 3, 2006, 10:50pm UTC](https://www.ruby-forum.com/t/new-to-ruby-needs-help/51588/1 "2006-01-03T22:50:29Z")

</div>

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
