Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1991-1998 Microsoft Corporation
  3. Module Name:
  4. conroute.h
  5. Abstract:
  6. This include file contains all the type and constant definitions that are
  7. shared by the BASE and CONSOLE components of the Windows Subsystem.
  8. Author:
  9. Therese Stowell (thereses) 3-Jan-1991
  10. Revision History:
  11. --*/
  12. //
  13. // These bits are always on for console handles and are used for routing
  14. // by windows.
  15. //
  16. #define CONSOLE_HANDLE_SIGNATURE 0x00000003
  17. #define CONSOLE_HANDLE_NEVERSET 0x10000000
  18. #define CONSOLE_HANDLE_MASK (CONSOLE_HANDLE_SIGNATURE | CONSOLE_HANDLE_NEVERSET)
  19. #define CONSOLE_HANDLE(HANDLE) (((ULONG_PTR)(HANDLE) & CONSOLE_HANDLE_MASK) == CONSOLE_HANDLE_SIGNATURE)
  20. #define CONSOLE_DETACHED_PROCESS ((HANDLE)-1)
  21. #define CONSOLE_NEW_CONSOLE ((HANDLE)-2)
  22. #define CONSOLE_CREATE_NO_WINDOW ((HANDLE)-3)
  23. //
  24. // These are flags stored in PEB::ProcessParameters::ConsoleFlags.
  25. //
  26. #define CONSOLE_IGNORE_CTRL_C 0x1
  27. //
  28. // These strings are used to open console input or output.
  29. //
  30. #define CONSOLE_INPUT_STRING L"CONIN$"
  31. #define CONSOLE_OUTPUT_STRING L"CONOUT$"
  32. #define CONSOLE_GENERIC L"CON"
  33. //
  34. // this string is used to call RegisterWindowMessage to get
  35. // progman's handle.
  36. //
  37. #define CONSOLE_PROGMAN_HANDLE_MESSAGE "ConsoleProgmanHandle"
  38. //
  39. // stream API definitions. these API are only supposed to be used by
  40. // subsystems (i.e. OpenFile routes to OpenConsoleW).
  41. //
  42. HANDLE
  43. APIENTRY
  44. OpenConsoleW(
  45. IN LPWSTR lpConsoleDevice,
  46. IN DWORD dwDesiredAccess,
  47. IN BOOL bInheritHandle,
  48. IN DWORD dwShareMode
  49. );
  50. HANDLE
  51. APIENTRY
  52. DuplicateConsoleHandle(
  53. IN HANDLE hSourceHandle,
  54. IN DWORD dwDesiredAccess,
  55. IN BOOL bInheritHandle,
  56. IN DWORD dwOptions
  57. );
  58. BOOL
  59. APIENTRY
  60. GetConsoleHandleInformation(
  61. IN HANDLE hObject,
  62. OUT LPDWORD lpdwFlags
  63. );
  64. BOOL
  65. APIENTRY
  66. SetConsoleHandleInformation(
  67. IN HANDLE hObject,
  68. IN DWORD dwMask,
  69. IN DWORD dwFlags
  70. );
  71. BOOL
  72. APIENTRY
  73. CloseConsoleHandle(
  74. IN HANDLE hConsole
  75. );
  76. BOOL
  77. APIENTRY
  78. VerifyConsoleIoHandle(
  79. IN HANDLE hIoHandle
  80. );
  81. HANDLE
  82. APIENTRY
  83. GetConsoleInputWaitHandle( VOID );