jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

LoadError iaccessibleDll.dll on windows 7 #68

Closed GuidoDubois closed 11 years ago

GuidoDubois commented 11 years ago

Hi,

I get the following error when I want to start this simple example: code:

    require "rautomation"
    window = RAutomation::Window.new(:title => 'File Download', :adapter => :win_32)
    put window.title

Error:

C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:123:in `block in ffi_lib': Could not open library 'C:/Ruby200-x64/lib/ruby/gems/2
.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/../../../../ext/IAccessibleDLL/Release/iaccessibleDll':  (LoadError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `map'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `ffi_lib'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/functions.rb:8:in `<module:Functions>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/functions.rb:5:in `<module:Win32>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/functions.rb:3:in `<module:Adapter>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/functions.rb:2:in `<module:RAutomation>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32/functions.rb:1:in `<top (required)>'
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/adapter/win_32.rb:9:in `<top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/window.rb:67:in `const_get'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/lib/rautomation/window.rb:67:in `initialize'
        from test.rb:3:in `new'
        from test.rb:3:in `<main>'

This iaccessibleDll.dll file exsists, the path to it is correct and is readable as far as I can see now, but nothing happens :(

I found somewere that it could be the problem, that the path is relative, but when I change the path to: C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rautomation-0.9.2/ext/IAccessibleDLL/Release/iaccessibleDll.dll It still doen't work.

The other files that should be load are loaded fine, but this important one doesn't. How can I fix this?

jarmo commented 11 years ago

I bet that the problem is in the fact that you're using 64bit Ruby. Can you try with 32bit version?

GuidoDubois commented 11 years ago

Well you bet correctly! :-) I can try, but is there also a way to do it on a 64bit ruby?

leviwilson commented 11 years ago

The C++ DLLs that are currently built for RAutomation for x86 only. They would need to be built for x64 as well and also have FFI know which one to load based upon the current architecture.

GuidoDubois commented 11 years ago

ah that makes sense. Well on 32-bit it works THNX!

leviwilson commented 11 years ago

@Gtjw3110 If you'd like, go ahead and make an enhancement request for x64 and reference this issue. I'll see what I can do when I find some time.