public static extern bool SetConsoleCtrlHandler(CtrlEventDelegate callback, bool add);
public static void RegisterCtrlEventFunction(CtrlEventDelegate function) { Interop.ConsoleApi.SetConsoleCtrlHandler(function, true); }