如题,我想用 ruby 加载一个 DelPhi7 写成的 dll
1)
require 'dl'
require 'dl/import'
module A
extend DL::Importer
end
require 'fiddle'
lib = Fiddle.dlopen('btnetwork.dll')
2)
require 'dl'
DL.dlopen('btnetwork.dll')
使用以上两种写法都一直报错
Documents/dll_test.rb:15:in `initialize': dlopen(/btnetwork.dll, 9): no suitable image found. Did find: (DL::DLError)
/btnetwork.dll: unknown file type, first eight bytes: 0x4D 0x5A 0x50 0x00 0x02 0x00 0x00 0x00