Subject:
Re: [ruby-ffi] Pointer to a struct - how to cast?
From:
Jeremy Voorhis
Date:
5/20/10 12:19 PM
To:
ruby-ffi@googlegroups.com

The address is in the output of inspect (0x4145ec0). You can also use Pointer#to_i.

Best,

Jeremy

On Thu, May 20, 2010 at 10:16 AM, DA <drew.avis@gmail.com> wrote:
On Thu, May 20, 2010 at 12:37 PM, Jeremy Voorhis <jvoorhis@gmail.com> wrote:
> The code looks alright to me on first glance. Are you sure your pointer is
> valid?

I'm not sure how to check that.  If I do this:
puts "p: #{p}"
I get:
p: #<FFI::Pointer:0x4145ec0>

Is there a tool I could use to take a peek at that address?  (I'm on Win7.)

Drew