search for: ctrlhandler

Displaying 1 result from an estimated 1 matches for "ctrlhandler".

Did you mean: cthandler
2008 Jan 20
0
Ctrl handler makes Ruby crash
.....once. Then the interpreter crashes. Why? And what can we do about it? The code is based on this: http://msdn2.microsoft.com/en-us/library/ms685049(VS.85).aspx require ''windows/console'' require ''windows/sound'' include Windows::Console include Windows::Sound CtrlHandler = Win32::API::Callback.new(''L'', ''I''){ |ctrl_type| case ctrl_type when CTRL_C_EVENT puts "Ctrl-C event" Beep(750, 300) return true when CTRL_CLOSE_EVENT Beep(600, 200) puts "Ctrl-Cl...