internal void Hook() { if (!_hooked) { bool r = Win32Native.SetConsoleCtrlHandler(_handler, true); if (!r) __Error.WinIOError(); _hooked = true; } }