Philippe Lang
4/21/2008 5:29:00 PM
Hi,
I'm trying to setup a win32 ole callback that would notify me that the
application that was launched has quit, in order to release the process
from memory.
The code I'm playing with looks like:
@@access =3D WIN32OLE.new('Access.Application')
@@access.OpenCurrentDatabase(@database)
begin
@@event_sink =3D WIN32OLE_EVENT.new(@@access, <???>)
stop_listening =3D false
@@event_sink.on_event("Quit") do |*args|=20
puts "Access application has quit!"
stop_listening =3D true
end
WIN32OLE_EVENT.message_loop until stop_listening
rescue Exception =3D> e
puts e.message
end
I cannot find any event interface that would notify me that the MS
Access application has quit. I checked with "Simple OLE Browser", but no
luck. And most examples regarding WIN32OLE_EVENT are done with Internet
Explorer.
Does anyone have an idea?
Thanks,
Philippe Lang