summaryrefslogtreecommitdiff
path: root/jni/ruby/test/win32ole/err_in_callback.rb
blob: fabb7bef0ef641672e1544d71a38b9a9dd14211c (plain)
1
2
3
4
5
6
7
8
9
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