1 #ifndef __WINDOWS_TYPES__     2 #define __WINDOWS_TYPES__     6 #define MAX_NUM_DEVICES 50    14 typedef unsigned short                  WORD;
    15 typedef unsigned char                   BYTE;
    19 typedef unsigned char                   CHAR;
    66 #define MS_CTS_ON           ((DWORD)0x0010)    67 #define MS_DSR_ON           ((DWORD)0x0020)    68 #define MS_RING_ON          ((DWORD)0x0040)    69 #define MS_RLSD_ON          ((DWORD)0x0080)    74 #define CE_RXOVER           0x0001  // Receive Queue overflow    75 #define CE_OVERRUN          0x0002  // Receive Overrun Error    76 #define CE_RXPARITY         0x0004  // Receive Parity Error    77 #define CE_FRAME            0x0008  // Receive Framing error    78 #define CE_BREAK            0x0010  // Break Detected    79 #define CE_TXFULL           0x0100  // TX Queue is full    80 #define CE_PTO              0x0200  // LPTx Timeout    81 #define CE_IOE              0x0400  // LPTx I/O Error    82 #define CE_DNS              0x0800  // LPTx Device not selected    83 #define CE_OOP              0x1000  // LPTx Out-Of-Paper    84 #define CE_MODE             0x8000  // Requested mode unsupported    89 #define EV_RXCHAR           0x0001  // Any Character received    90 #define EV_RXFLAG           0x0002  // Received certain character    91 #define EV_TXEMPTY          0x0004  // Transmit Queue Empty    92 #define EV_CTS              0x0008  // CTS changed state    93 #define EV_DSR              0x0010  // DSR changed state    94 #define EV_RLSD             0x0020  // RLSD changed state    95 #define EV_BREAK            0x0040  // BREAK received    96 #define EV_ERR              0x0080  // Line status error occurred    97 #define EV_RING             0x0100  // Ring signal detected    98 #define EV_PERR             0x0200  // Printer error occured    99 #define EV_RX80FULL         0x0400  // Receive buffer is 80 percent full   100 #define EV_EVENT1           0x0800  // Provider specific event 1   101 #define EV_EVENT2           0x1000  // Provider specific event 2   106 #define SETXOFF             1       // Simulate XOFF received   107 #define SETXON              2       // Simulate XON received   108 #define SETRTS              3       // Set RTS high   109 #define CLRRTS              4       // Set RTS low   110 #define SETDTR              5       // Set DTR high   111 #define CLRDTR              6       // Set DTR low   112 #define RESETDEV            7       // Reset device if possible   113 #define SETBREAK            8       // Set the device break line.   114 #define CLRBREAK            9       // Clear the device break line.   119 #define PURGE_TXABORT       0x0001  // Kill the pending/current writes to the comm port.   120 #define PURGE_RXABORT       0x0002  // Kill the pending/current reads to the comm port.   121 #define PURGE_TXCLEAR       0x0004  // Kill the transmit queue if there.   122 #define PURGE_RXCLEAR       0x0008  // Kill the typeahead buffer if there.   124 #ifndef INVALID_HANDLE_VALUE   125 #define INVALID_HANDLE_VALUE 0xFFFFFFFF 
struct _OVERLAPPED * LPOVERLAPPED
unsigned long long int ULONGLONG
struct _SECURITY_ATTRIBUTES * LPSECURITY_ATTRIBUTES
struct _OVERLAPPED OVERLAPPED
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
struct timeval SYSTEMTIME
LPVOID lpSecurityDescriptor