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