Source code of Windows XP (NT5)
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.

90 lines
3.1 KiB

  1. /***************************************************************************
  2. *
  3. * TDASYNC.H
  4. *
  5. * This module contains private TDASYNC defines and structures
  6. *
  7. * Copyright 1998, Microsoft
  8. *
  9. ****************************************************************************/
  10. //
  11. // Miscellaneous defines... (original files noted)
  12. //
  13. #define EVENT_MODIFY_STATE 0x0002 // winnt.h
  14. #define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3) // winnt.h
  15. #define INFINITE 0xffffffff // winbase.w
  16. #define WAIT_FAILED (ULONG)0xFFFFFFFF
  17. #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
  18. #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
  19. #define WAIT_TIMEOUT STATUS_TIMEOUT
  20. #define WAIT_IO_COMPLETION STATUS_USER_APC
  21. /*
  22. * Modem Status Flags (Copied from \nt\public\sdk\inc\winbase.h)
  23. */
  24. #define MS_CTS_ON ((ULONG)0x0010)
  25. #define MS_DSR_ON ((ULONG)0x0020)
  26. #define MS_RING_ON ((ULONG)0x0040)
  27. #define MS_RLSD_ON ((ULONG)0x0080)
  28. //
  29. // Events (Copied from \nt\public\sdk\inc\winbase.h)
  30. //
  31. #define EV_RXCHAR 0x0001 // Any Character received
  32. #define EV_RXFLAG 0x0002 // Received certain character
  33. #define EV_TXEMPTY 0x0004 // Transmitt Queue Empty
  34. #define EV_CTS 0x0008 // CTS changed state
  35. #define EV_DSR 0x0010 // DSR changed state
  36. #define EV_RLSD 0x0020 // RLSD changed state
  37. #define EV_BREAK 0x0040 // BREAK received
  38. #define EV_ERR 0x0080 // Line status error occurred
  39. #define EV_RING 0x0100 // Ring signal detected
  40. #define EV_PERR 0x0200 // Printer error occured
  41. #define EV_RX80FULL 0x0400 // Receive buffer is 80 percent full
  42. #define EV_EVENT1 0x0800 // Provider specific event 1
  43. #define EV_EVENT2 0x1000 // Provider specific event 2
  44. //
  45. // File Structures - _OVERLAPPED
  46. //
  47. // Used by ZwDeviceIoControlFile
  48. //
  49. typedef struct _TDIOSTATUS {
  50. ULONG Internal; // InternalHigh must follow immediately
  51. ULONG InternalHigh;
  52. ULONG Offset; // OffsetHigh must follow immediately
  53. ULONG OffsetHigh;
  54. HANDLE hEvent;
  55. PKEVENT pEventObject; // pointer to hEvent's object
  56. } TDIOSTATUS, *PTDIOSTATUS;
  57. /*
  58. * Async endpoint structure
  59. */
  60. typedef struct _TDASYNC_ENDPOINT {
  61. HANDLE hDevice; // handle for input and output
  62. PFILE_OBJECT pFileObject; // Pointer to hDevice's File Object
  63. PDEVICE_OBJECT pDeviceObject; // Pointer to hDevice's Device Object
  64. PEPROCESS InitProcess; // process which opened endpoint
  65. TDIOSTATUS SignalIoStatus; // TD- or CD-created status event
  66. } TDASYNC_ENDPOINT, * PTDASYNC_ENDPOINT;
  67. /*
  68. * ASYNC TD structure
  69. */
  70. typedef struct _TDASYNC {
  71. TDASYNC_ENDPOINT Endpoint;
  72. HANDLE hStatusEvent; // handle for status wait
  73. PKEVENT pStatusEventObject; // points to hStatusEvent's object
  74. ULONG EventMask; // input - RS-232 signal mask
  75. ULONG fCommEventIoctl : 1; // Comm Event Ioctl Pending
  76. ULONG fCloseEndpoint : 1; // if set, close endpoint on device close
  77. } TDASYNC, * PTDASYNC;