DL (1.9.2p180) nested struct definitions

J

Jon

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

http://msdn.microsoft.com/en-us/library/ms684342(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa365467(v=vs.85).aspx

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:in `block 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:in `parse_struct_signature'
from C:/ruby192/lib/ruby/1.9.1/dl/import.rb:173:in `union'
from dl_readfile.rb:27:in `<module:Win32FileAPI>'
from dl_readfile.rb:4:in `<main>'

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

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top