DL (1.9.2p180) nested struct definitions

The sample code https://gist.github.com/872458 tries to declare the
OVERLAPPED struct and ReadFile fcn from


Lines 19-34 of the gist are wrong and give the following error:

C:\Users\Jon\Documents\RubyDev\sandbox>ruby dl_readfile.rb
C:/ruby192/lib/ruby/1.9.1/dl/cparser.rb:104:in parse_ctype': unknown type: OL_OFFSET (DL::DLError) from C:/ruby192/lib/ruby/1.9.1/dl/cparser.rb:33:inblock in
parse_struct_signature’
from C:/ruby192/lib/ruby/1.9.1/dl/cparser.rb:9:in each' from C:/ruby192/lib/ruby/1.9.1/dl/cparser.rb:9:inparse_struct_signature’
from C:/ruby192/lib/ruby/1.9.1/dl/import.rb:173:in union' from dl_readfile.rb:27:inmodule:Win32FileAPI
from dl_readfile.rb:4:in `’

I’ve tried a couple different nested struct styles but haven’t got it to
work. How should I define OVERLAPPED?

Jon


blog: http://jonforums.github.com/
twitter: @jonforums

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs