Subject: Re: [ruby-ffi] Re: Problem retrieving struct from pointer |
From: Wayne Meissner |
Date: 8/9/10 5:40 PM |
To: ruby-ffi@googlegroups.com |
On 10 August 2010 07:41, Joe <jm202@yahoo.com> wrote:
What I've tried is, created a new class to emulate the C struct: class HBA_Wwn < FFI::Struct layout :wwn, [:uint32, 8] end
Change that to [:uint8, 8], and you should be able to call #to_s on it to convert to a string. Otherwise, you can call #to_ptr on any array field, and use get_string().