is_console_handle.c 250 B

1234567891011121314
  1. /*
  2. * Determine whether a Windows HANDLE points at a console device.
  3. */
  4. #include "putty.h"
  5. bool is_console_handle(HANDLE handle)
  6. {
  7. DWORD ignored_output;
  8. if (GetConsoleMode(handle, &ignored_output))
  9. return true;
  10. return false;
  11. }