DL (1.9.2p180) nested struct definitions

Discussion in 'Ruby' started by Jon, Mar 16, 2011.

  1. Jon

    Jon Guest

    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

    ---
    blog: http://jonforums.github.com/
    twitter: @jonforums
    Jon, Mar 16, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Fogelklou
    Replies:
    36
    Views:
    1,356
    Chris Fogelklou
    Apr 20, 2004
  2. Daniel Rudy
    Replies:
    7
    Views:
    439
    Daniel Rudy
    Mar 31, 2006
  3. oo@@oo
    Replies:
    1
    Views:
    289
    Hallvard B Furuseth
    Aug 4, 2006
  4. James Brown

    scope of struct definitions

    James Brown, Nov 3, 2006, in forum: C Programming
    Replies:
    2
    Views:
    270
  5. Eric Sosman

    Re: C scope and struct definitions

    Eric Sosman, Jun 22, 2012, in forum: C Programming
    Replies:
    63
    Views:
    1,336
    Tim Rentsch
    Jul 2, 2012
Loading...

Share This Page