Subject:
Re: [ruby-ffi] Re: Newbie ? about porting code from VB to Ruby
From:
Charles Strahan
Date:
6/8/11 6:34 PM
To:
ruby-ffi@googlegroups.com

Woops, I screwed up the wVersion - should have been a uint16, instead of uint8.  The gist should be fixed now.

-Charles


On Wed, Jun 8, 2011 at 6:14 PM, Charles Strahan <charles.c.strahan@gmail.com> wrote:
Hi Jesse,

Welcome to the Ruby community!

I think this will work for you: https://gist.github.com/1015672

I tried to annotate the sample as well as I could. If anything is unclear, or doesn't work, please let me know.

Unfortunately, I do not have the HLLAPI lib to test with, so I had to base that code off of the docs and some .NET samples.

HTH,

-Charles


On Wed, Jun 8, 2011 at 1:11 PM, JesseFair <jfair9@gmail.com> wrote:
I tried Win32API as well but cant find out how to pass the cutom data
type WHLLAPIDATA that the WinHLLAPIStartup function is expecting.
Being new to Ruby I cant find a way to construct something that acts
similar to the above code -.. i.e. custom data types. I was able to
get the examples up and working but they only use simple data types
such as int and string.


On Jun 8, 1:18 am, candlerb <b.cand...@pobox.com> wrote:
> I am not a Windows expert, but have you tried looking at Win32API
> instead of FFI? This may be all that you need. There are plenty of
> examples if you google for them.
>
> http://www.ruby-doc.org/docs/ProgrammingRuby/html/win32.htmlhttp://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_windows.html