| 32 | #include <windows.h> |
| 33 | |
| 34 | bool ctrlhandler(DWORD fdwctrltype) |
| 35 | { |
| 36 | switch (fdwctrltype) { |
| 37 | case CTRL_C_EVENT: |
| 38 | std::cout << "Keyboard Interrupt (Ctrl+C Received)" << std::endl; |
| 39 | cs::current_process->raise_sigint(); |
| 40 | return true; |
| 41 | case CTRL_BREAK_EVENT: { |
| 42 | int code = 0; |
| 43 | cs::process_context::on_process_exit_default_handler(&code); |
| 44 | return true; |
| 45 | } |
| 46 | default: |
| 47 | return false; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | void activate_sigint_handler() |
| 52 | { |
nothing calls this directly
no test coverage detected