mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2d45869c76
before invoking IConnectionPoint::Release. * test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb, test/win32ole/test_err_in_callback.rb: Use ActiveX Data Object Library instead of InternetExplorer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
9 lines
249 B
Ruby
9 lines
249 B
Ruby
require 'win32ole'
|
|
db = WIN32OLE.new('ADODB.Connection')
|
|
db.connectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.;"
|
|
ev = WIN32OLE_EVENT.new(db)
|
|
ev.on_event('WillConnect') {|*args|
|
|
foo
|
|
}
|
|
db.open
|
|
WIN32OLE_EVENT.message_loop
|