WinTypes.h
Go to the documentation of this file.
1 #ifndef __WINDOWS_TYPES__
2 #define __WINDOWS_TYPES__
3 
4 #define WINAPI
5 
6 #define MAX_NUM_DEVICES 50
7 #include <sys/time.h>
8 
9 typedef unsigned int DWORD;
10 typedef unsigned int ULONG;
11 typedef unsigned short USHORT;
12 typedef unsigned short SHORT;
13 typedef unsigned char UCHAR;
14 typedef unsigned short WORD;
15 typedef unsigned char BYTE;
16 typedef BYTE *LPBYTE;
17 typedef unsigned int BOOL;
18 typedef unsigned char BOOLEAN;
19 typedef unsigned char CHAR;
20 typedef BOOL *LPBOOL;
21 typedef UCHAR *PUCHAR;
22 typedef const char *LPCSTR;
23 typedef char *PCHAR;
24 typedef void *PVOID;
25 typedef void *HANDLE;
26 typedef unsigned int LONG;
27 typedef int INT;
28 typedef unsigned int UINT;
29 typedef char *LPSTR;
30 typedef char *LPTSTR;
31 typedef const char *LPCTSTR;
32 typedef DWORD *LPDWORD;
33 typedef WORD *LPWORD;
34 typedef ULONG *PULONG;
35 typedef LONG *LPLONG;
36 typedef PVOID LPVOID;
37 typedef void VOID;
38 typedef unsigned long long int ULONGLONG;
39 
40 typedef struct _OVERLAPPED {
47 
48 typedef struct _SECURITY_ATTRIBUTES {
53 
54 typedef struct timeval SYSTEMTIME;
55 typedef struct timeval FILETIME;
56 #ifndef TRUE
57 #define TRUE 1
58 #endif
59 #ifndef FALSE
60 #define FALSE 0
61 #endif
62 
63 //
64 // Modem Status Flags
65 //
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)
70 
71 //
72 // Error Flags
73 //
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
85 
86 //
87 // Events
88 //
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
102 
103 //
104 // Escape Functions
105 //
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.
115 
116 //
117 // PURGE function flags.
118 //
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.
123 
124 #ifndef INVALID_HANDLE_VALUE
125 #define INVALID_HANDLE_VALUE 0xFFFFFFFF
126 #endif
127 
128 #endif
char * LPSTR
Definition: WinTypes.h:29
unsigned char CHAR
Definition: WinTypes.h:19
void * HANDLE
Definition: WinTypes.h:25
char * LPTSTR
Definition: WinTypes.h:30
unsigned short SHORT
Definition: WinTypes.h:12
unsigned short WORD
Definition: WinTypes.h:14
unsigned char BOOLEAN
Definition: WinTypes.h:18
void VOID
Definition: WinTypes.h:37
const char * LPCSTR
Definition: WinTypes.h:22
struct _OVERLAPPED * LPOVERLAPPED
DWORD Offset
Definition: WinTypes.h:43
unsigned long long int ULONGLONG
Definition: WinTypes.h:38
unsigned short USHORT
Definition: WinTypes.h:11
void * PVOID
Definition: WinTypes.h:24
ULONG * PULONG
Definition: WinTypes.h:34
char * PCHAR
Definition: WinTypes.h:23
DWORD Internal
Definition: WinTypes.h:41
HANDLE hEvent
Definition: WinTypes.h:45
DWORD InternalHigh
Definition: WinTypes.h:42
unsigned int LONG
Definition: WinTypes.h:26
LONG * LPLONG
Definition: WinTypes.h:35
struct _SECURITY_ATTRIBUTES * LPSECURITY_ATTRIBUTES
struct _OVERLAPPED OVERLAPPED
WORD * LPWORD
Definition: WinTypes.h:33
unsigned char UCHAR
Definition: WinTypes.h:13
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
BYTE * LPBYTE
Definition: WinTypes.h:16
struct timeval SYSTEMTIME
Definition: WinTypes.h:54
BOOL * LPBOOL
Definition: WinTypes.h:20
LPVOID lpSecurityDescriptor
Definition: WinTypes.h:50
DWORD OffsetHigh
Definition: WinTypes.h:44
const char * LPCTSTR
Definition: WinTypes.h:31
unsigned int BOOL
Definition: WinTypes.h:17
DWORD * LPDWORD
Definition: WinTypes.h:32
unsigned int DWORD
Definition: WinTypes.h:9
unsigned int UINT
Definition: WinTypes.h:28
unsigned int ULONG
Definition: WinTypes.h:10
unsigned char BYTE
Definition: WinTypes.h:15
PVOID LPVOID
Definition: WinTypes.h:36
struct timeval FILETIME
Definition: WinTypes.h:55
UCHAR * PUCHAR
Definition: WinTypes.h:21
int INT
Definition: WinTypes.h:27


libsegwayrmp
Author(s): William Woodall
autogenerated on Mon Jun 10 2019 13:46:50