Newbie: Calling methods from a dll

I am trying to call methods from a dll. I know this works with Python. I
want to rubify it. My code is as follows:

require ‘dl’
require ‘dl/import’
h_rrcApi = DL.dlopen(“mydll.Dll”)
h_rrcApi.mymethod(10, 120, 4, 208)

when I run this i get the error:

CreateCell_DeleteCell.rb:32:in <main>': undefined methodmymethod’ for
#DL::Handle:0x29af840 (NoMethodError)

Any ideas where im going wrong would be much appreciated.

Jerome

Jesus, it was easier than I though.

test = Win32API.new(“mydll”,“mymethod”, 0)
test.call(10, 120, 1, 233)

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