Chris Liechti | fbdd8a0 | 2015-08-09 02:37:45 +0200 | [diff] [blame] | 1 | #! python |
| 2 | # |
Chris Liechti | 3e02f70 | 2015-12-16 23:06:04 +0100 | [diff] [blame] | 3 | # Constants and types for use with Windows API, used by serialwin32.py |
| 4 | # |
| 5 | # This file is part of pySerial. https://github.com/pyserial/pyserial |
Chris Liechti | fbdd8a0 | 2015-08-09 02:37:45 +0200 | [diff] [blame] | 6 | # (C) 2001-2015 Chris Liechti <cliechti@gmx.net> |
| 7 | # |
| 8 | # SPDX-License-Identifier: BSD-3-Clause |
| 9 | |
Chris Liechti | 9eaa40c | 2016-02-12 23:32:59 +0100 | [diff] [blame] | 10 | # pylint: disable=invalid-name,too-few-public-methods,protected-access,too-many-instance-attributes |
| 11 | |
Chris Liechti | 6ba7d6f | 2016-01-28 21:02:49 +0100 | [diff] [blame] | 12 | from ctypes import c_ulong, c_void_p, c_int64, c_char, \ |
| 13 | WinDLL, sizeof, Structure, Union, POINTER |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 14 | from ctypes.wintypes import HANDLE |
| 15 | from ctypes.wintypes import BOOL |
| 16 | from ctypes.wintypes import LPCWSTR |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 17 | from ctypes.wintypes import DWORD |
| 18 | from ctypes.wintypes import WORD |
| 19 | from ctypes.wintypes import BYTE |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 20 | _stdcall_libraries = {} |
| 21 | _stdcall_libraries['kernel32'] = WinDLL('kernel32') |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 22 | |
cliechti | e37b6a8 | 2009-07-24 12:19:50 +0000 | [diff] [blame] | 23 | INVALID_HANDLE_VALUE = HANDLE(-1).value |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 24 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 25 | |
cliechti | 251e5ce | 2011-08-25 01:24:49 +0000 | [diff] [blame] | 26 | # some details of the windows API differ between 32 and 64 bit systems.. |
| 27 | def is_64bit(): |
| 28 | """Returns true when running on a 64 bit system""" |
| 29 | return sizeof(c_ulong) != sizeof(c_void_p) |
| 30 | |
cliechti | de43290 | 2011-08-18 22:51:41 +0000 | [diff] [blame] | 31 | # ULONG_PTR is a an ordinary number, not a pointer and contrary to the name it |
| 32 | # is either 32 or 64 bits, depending on the type of windows... |
| 33 | # so test if this a 32 bit windows... |
cliechti | 251e5ce | 2011-08-25 01:24:49 +0000 | [diff] [blame] | 34 | if is_64bit(): |
cliechti | de43290 | 2011-08-18 22:51:41 +0000 | [diff] [blame] | 35 | ULONG_PTR = c_int64 |
cliechti | 251e5ce | 2011-08-25 01:24:49 +0000 | [diff] [blame] | 36 | else: |
cliechti | 251e5ce | 2011-08-25 01:24:49 +0000 | [diff] [blame] | 37 | ULONG_PTR = c_ulong |
cliechti | de43290 | 2011-08-18 22:51:41 +0000 | [diff] [blame] | 38 | |
| 39 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 40 | class _SECURITY_ATTRIBUTES(Structure): |
| 41 | pass |
| 42 | LPSECURITY_ATTRIBUTES = POINTER(_SECURITY_ATTRIBUTES) |
| 43 | |
cliechti | e37b6a8 | 2009-07-24 12:19:50 +0000 | [diff] [blame] | 44 | |
cliechti | 8a34513 | 2011-08-05 02:33:14 +0000 | [diff] [blame] | 45 | try: |
| 46 | CreateEventW = _stdcall_libraries['kernel32'].CreateEventW |
| 47 | except AttributeError: |
| 48 | # Fallback to non wide char version for old OS... |
| 49 | from ctypes.wintypes import LPCSTR |
| 50 | CreateEventA = _stdcall_libraries['kernel32'].CreateEventA |
| 51 | CreateEventA.restype = HANDLE |
| 52 | CreateEventA.argtypes = [LPSECURITY_ATTRIBUTES, BOOL, BOOL, LPCSTR] |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 53 | CreateEvent = CreateEventA |
cliechti | 8a34513 | 2011-08-05 02:33:14 +0000 | [diff] [blame] | 54 | |
| 55 | CreateFileA = _stdcall_libraries['kernel32'].CreateFileA |
| 56 | CreateFileA.restype = HANDLE |
| 57 | CreateFileA.argtypes = [LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE] |
| 58 | CreateFile = CreateFileA |
| 59 | else: |
| 60 | CreateEventW.restype = HANDLE |
| 61 | CreateEventW.argtypes = [LPSECURITY_ATTRIBUTES, BOOL, BOOL, LPCWSTR] |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 62 | CreateEvent = CreateEventW # alias |
cliechti | 8a34513 | 2011-08-05 02:33:14 +0000 | [diff] [blame] | 63 | |
| 64 | CreateFileW = _stdcall_libraries['kernel32'].CreateFileW |
| 65 | CreateFileW.restype = HANDLE |
| 66 | CreateFileW.argtypes = [LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE] |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 67 | CreateFile = CreateFileW # alias |
| 68 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 69 | |
| 70 | class _OVERLAPPED(Structure): |
| 71 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 72 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 73 | OVERLAPPED = _OVERLAPPED |
| 74 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 75 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 76 | class _COMSTAT(Structure): |
| 77 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 78 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 79 | COMSTAT = _COMSTAT |
| 80 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 81 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 82 | class _DCB(Structure): |
| 83 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 84 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 85 | DCB = _DCB |
| 86 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 87 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 88 | class _COMMTIMEOUTS(Structure): |
| 89 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 90 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 91 | COMMTIMEOUTS = _COMMTIMEOUTS |
| 92 | |
| 93 | GetLastError = _stdcall_libraries['kernel32'].GetLastError |
| 94 | GetLastError.restype = DWORD |
| 95 | GetLastError.argtypes = [] |
| 96 | |
| 97 | LPOVERLAPPED = POINTER(_OVERLAPPED) |
| 98 | LPDWORD = POINTER(DWORD) |
| 99 | |
| 100 | GetOverlappedResult = _stdcall_libraries['kernel32'].GetOverlappedResult |
| 101 | GetOverlappedResult.restype = BOOL |
| 102 | GetOverlappedResult.argtypes = [HANDLE, LPOVERLAPPED, LPDWORD, BOOL] |
| 103 | |
| 104 | ResetEvent = _stdcall_libraries['kernel32'].ResetEvent |
| 105 | ResetEvent.restype = BOOL |
| 106 | ResetEvent.argtypes = [HANDLE] |
| 107 | |
| 108 | LPCVOID = c_void_p |
| 109 | |
| 110 | WriteFile = _stdcall_libraries['kernel32'].WriteFile |
| 111 | WriteFile.restype = BOOL |
| 112 | WriteFile.argtypes = [HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED] |
| 113 | |
| 114 | LPVOID = c_void_p |
| 115 | |
| 116 | ReadFile = _stdcall_libraries['kernel32'].ReadFile |
| 117 | ReadFile.restype = BOOL |
| 118 | ReadFile.argtypes = [HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED] |
| 119 | |
| 120 | CloseHandle = _stdcall_libraries['kernel32'].CloseHandle |
| 121 | CloseHandle.restype = BOOL |
| 122 | CloseHandle.argtypes = [HANDLE] |
| 123 | |
| 124 | ClearCommBreak = _stdcall_libraries['kernel32'].ClearCommBreak |
| 125 | ClearCommBreak.restype = BOOL |
| 126 | ClearCommBreak.argtypes = [HANDLE] |
| 127 | |
| 128 | LPCOMSTAT = POINTER(_COMSTAT) |
| 129 | |
| 130 | ClearCommError = _stdcall_libraries['kernel32'].ClearCommError |
| 131 | ClearCommError.restype = BOOL |
| 132 | ClearCommError.argtypes = [HANDLE, LPDWORD, LPCOMSTAT] |
| 133 | |
| 134 | SetupComm = _stdcall_libraries['kernel32'].SetupComm |
| 135 | SetupComm.restype = BOOL |
| 136 | SetupComm.argtypes = [HANDLE, DWORD, DWORD] |
| 137 | |
| 138 | EscapeCommFunction = _stdcall_libraries['kernel32'].EscapeCommFunction |
| 139 | EscapeCommFunction.restype = BOOL |
| 140 | EscapeCommFunction.argtypes = [HANDLE, DWORD] |
| 141 | |
| 142 | GetCommModemStatus = _stdcall_libraries['kernel32'].GetCommModemStatus |
| 143 | GetCommModemStatus.restype = BOOL |
| 144 | GetCommModemStatus.argtypes = [HANDLE, LPDWORD] |
| 145 | |
| 146 | LPDCB = POINTER(_DCB) |
| 147 | |
| 148 | GetCommState = _stdcall_libraries['kernel32'].GetCommState |
| 149 | GetCommState.restype = BOOL |
| 150 | GetCommState.argtypes = [HANDLE, LPDCB] |
| 151 | |
| 152 | LPCOMMTIMEOUTS = POINTER(_COMMTIMEOUTS) |
| 153 | |
| 154 | GetCommTimeouts = _stdcall_libraries['kernel32'].GetCommTimeouts |
| 155 | GetCommTimeouts.restype = BOOL |
| 156 | GetCommTimeouts.argtypes = [HANDLE, LPCOMMTIMEOUTS] |
| 157 | |
| 158 | PurgeComm = _stdcall_libraries['kernel32'].PurgeComm |
| 159 | PurgeComm.restype = BOOL |
| 160 | PurgeComm.argtypes = [HANDLE, DWORD] |
| 161 | |
| 162 | SetCommBreak = _stdcall_libraries['kernel32'].SetCommBreak |
| 163 | SetCommBreak.restype = BOOL |
| 164 | SetCommBreak.argtypes = [HANDLE] |
| 165 | |
| 166 | SetCommMask = _stdcall_libraries['kernel32'].SetCommMask |
| 167 | SetCommMask.restype = BOOL |
| 168 | SetCommMask.argtypes = [HANDLE, DWORD] |
| 169 | |
| 170 | SetCommState = _stdcall_libraries['kernel32'].SetCommState |
| 171 | SetCommState.restype = BOOL |
| 172 | SetCommState.argtypes = [HANDLE, LPDCB] |
| 173 | |
| 174 | SetCommTimeouts = _stdcall_libraries['kernel32'].SetCommTimeouts |
| 175 | SetCommTimeouts.restype = BOOL |
| 176 | SetCommTimeouts.argtypes = [HANDLE, LPCOMMTIMEOUTS] |
| 177 | |
cliechti | e37b6a8 | 2009-07-24 12:19:50 +0000 | [diff] [blame] | 178 | WaitForSingleObject = _stdcall_libraries['kernel32'].WaitForSingleObject |
| 179 | WaitForSingleObject.restype = DWORD |
| 180 | WaitForSingleObject.argtypes = [HANDLE, DWORD] |
| 181 | |
Chris Liechti | 5a39b88 | 2016-05-03 22:10:39 +0200 | [diff] [blame] | 182 | CancelIoEx = _stdcall_libraries['kernel32'].CancelIoEx |
| 183 | CancelIoEx.restype = BOOL |
| 184 | CancelIoEx.argtypes = [HANDLE, LPOVERLAPPED] |
| 185 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 186 | ONESTOPBIT = 0 # Variable c_int |
| 187 | TWOSTOPBITS = 2 # Variable c_int |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 188 | ONE5STOPBITS = 1 |
| 189 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 190 | NOPARITY = 0 # Variable c_int |
| 191 | ODDPARITY = 1 # Variable c_int |
| 192 | EVENPARITY = 2 # Variable c_int |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 193 | MARKPARITY = 3 |
| 194 | SPACEPARITY = 4 |
| 195 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 196 | RTS_CONTROL_HANDSHAKE = 2 # Variable c_int |
| 197 | RTS_CONTROL_DISABLE = 0 # Variable c_int |
| 198 | RTS_CONTROL_ENABLE = 1 # Variable c_int |
| 199 | RTS_CONTROL_TOGGLE = 3 # Variable c_int |
cliechti | e37b6a8 | 2009-07-24 12:19:50 +0000 | [diff] [blame] | 200 | SETRTS = 3 |
| 201 | CLRRTS = 4 |
| 202 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 203 | DTR_CONTROL_HANDSHAKE = 2 # Variable c_int |
| 204 | DTR_CONTROL_DISABLE = 0 # Variable c_int |
| 205 | DTR_CONTROL_ENABLE = 1 # Variable c_int |
cliechti | e37b6a8 | 2009-07-24 12:19:50 +0000 | [diff] [blame] | 206 | SETDTR = 5 |
| 207 | CLRDTR = 6 |
| 208 | |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 209 | MS_DSR_ON = 32 # Variable c_ulong |
| 210 | EV_RING = 256 # Variable c_int |
| 211 | EV_PERR = 512 # Variable c_int |
| 212 | EV_ERR = 128 # Variable c_int |
| 213 | SETXOFF = 1 # Variable c_int |
| 214 | EV_RXCHAR = 1 # Variable c_int |
| 215 | GENERIC_WRITE = 1073741824 # Variable c_long |
| 216 | PURGE_TXCLEAR = 4 # Variable c_int |
| 217 | FILE_FLAG_OVERLAPPED = 1073741824 # Variable c_int |
| 218 | EV_DSR = 16 # Variable c_int |
| 219 | MAXDWORD = 4294967295 # Variable c_uint |
| 220 | EV_RLSD = 32 # Variable c_int |
Chris Liechti | 7731e98 | 2015-11-02 23:46:07 +0100 | [diff] [blame] | 221 | ERROR_SUCCESS = 0 |
Chris Liechti | 3401840 | 2016-05-25 01:51:42 +0200 | [diff] [blame] | 222 | ERROR_OPERATION_ABORTED = 995 |
Chris Liechti | c0d6a0f | 2016-05-12 23:48:01 +0200 | [diff] [blame] | 223 | ERROR_IO_INCOMPLETE = 996 |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 224 | ERROR_IO_PENDING = 997 # Variable c_long |
| 225 | MS_CTS_ON = 16 # Variable c_ulong |
| 226 | EV_EVENT1 = 2048 # Variable c_int |
| 227 | EV_RX80FULL = 1024 # Variable c_int |
| 228 | PURGE_RXABORT = 2 # Variable c_int |
| 229 | FILE_ATTRIBUTE_NORMAL = 128 # Variable c_int |
| 230 | PURGE_TXABORT = 1 # Variable c_int |
| 231 | SETXON = 2 # Variable c_int |
| 232 | OPEN_EXISTING = 3 # Variable c_int |
| 233 | MS_RING_ON = 64 # Variable c_ulong |
| 234 | EV_TXEMPTY = 4 # Variable c_int |
| 235 | EV_RXFLAG = 2 # Variable c_int |
| 236 | MS_RLSD_ON = 128 # Variable c_ulong |
| 237 | GENERIC_READ = 2147483648 # Variable c_ulong |
| 238 | EV_EVENT2 = 4096 # Variable c_int |
| 239 | EV_CTS = 8 # Variable c_int |
| 240 | EV_BREAK = 64 # Variable c_int |
| 241 | PURGE_RXCLEAR = 8 # Variable c_int |
Chris Liechti | 68340d7 | 2015-08-03 14:15:48 +0200 | [diff] [blame] | 242 | INFINITE = 0xFFFFFFFF |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 243 | |
cliechti | de43290 | 2011-08-18 22:51:41 +0000 | [diff] [blame] | 244 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 245 | class N11_OVERLAPPED4DOLLAR_48E(Union): |
| 246 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 247 | |
| 248 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 249 | class N11_OVERLAPPED4DOLLAR_484DOLLAR_49E(Structure): |
| 250 | pass |
Chris Liechti | 033f17c | 2015-08-30 21:28:04 +0200 | [diff] [blame] | 251 | |
| 252 | |
cliechti | 183d4ae | 2009-07-23 22:03:51 +0000 | [diff] [blame] | 253 | N11_OVERLAPPED4DOLLAR_484DOLLAR_49E._fields_ = [ |
| 254 | ('Offset', DWORD), |
| 255 | ('OffsetHigh', DWORD), |
| 256 | ] |
| 257 | |
| 258 | PVOID = c_void_p |
| 259 | |
| 260 | N11_OVERLAPPED4DOLLAR_48E._anonymous_ = ['_0'] |
| 261 | N11_OVERLAPPED4DOLLAR_48E._fields_ = [ |
| 262 | ('_0', N11_OVERLAPPED4DOLLAR_484DOLLAR_49E), |
| 263 | ('Pointer', PVOID), |
| 264 | ] |
| 265 | _OVERLAPPED._anonymous_ = ['_0'] |
| 266 | _OVERLAPPED._fields_ = [ |
| 267 | ('Internal', ULONG_PTR), |
| 268 | ('InternalHigh', ULONG_PTR), |
| 269 | ('_0', N11_OVERLAPPED4DOLLAR_48E), |
| 270 | ('hEvent', HANDLE), |
| 271 | ] |
| 272 | _SECURITY_ATTRIBUTES._fields_ = [ |
| 273 | ('nLength', DWORD), |
| 274 | ('lpSecurityDescriptor', LPVOID), |
| 275 | ('bInheritHandle', BOOL), |
| 276 | ] |
| 277 | _COMSTAT._fields_ = [ |
| 278 | ('fCtsHold', DWORD, 1), |
| 279 | ('fDsrHold', DWORD, 1), |
| 280 | ('fRlsdHold', DWORD, 1), |
| 281 | ('fXoffHold', DWORD, 1), |
| 282 | ('fXoffSent', DWORD, 1), |
| 283 | ('fEof', DWORD, 1), |
| 284 | ('fTxim', DWORD, 1), |
| 285 | ('fReserved', DWORD, 25), |
| 286 | ('cbInQue', DWORD), |
| 287 | ('cbOutQue', DWORD), |
| 288 | ] |
| 289 | _DCB._fields_ = [ |
| 290 | ('DCBlength', DWORD), |
| 291 | ('BaudRate', DWORD), |
| 292 | ('fBinary', DWORD, 1), |
| 293 | ('fParity', DWORD, 1), |
| 294 | ('fOutxCtsFlow', DWORD, 1), |
| 295 | ('fOutxDsrFlow', DWORD, 1), |
| 296 | ('fDtrControl', DWORD, 2), |
| 297 | ('fDsrSensitivity', DWORD, 1), |
| 298 | ('fTXContinueOnXoff', DWORD, 1), |
| 299 | ('fOutX', DWORD, 1), |
| 300 | ('fInX', DWORD, 1), |
| 301 | ('fErrorChar', DWORD, 1), |
| 302 | ('fNull', DWORD, 1), |
| 303 | ('fRtsControl', DWORD, 2), |
| 304 | ('fAbortOnError', DWORD, 1), |
| 305 | ('fDummy2', DWORD, 17), |
| 306 | ('wReserved', WORD), |
| 307 | ('XonLim', WORD), |
| 308 | ('XoffLim', WORD), |
| 309 | ('ByteSize', BYTE), |
| 310 | ('Parity', BYTE), |
| 311 | ('StopBits', BYTE), |
| 312 | ('XonChar', c_char), |
| 313 | ('XoffChar', c_char), |
| 314 | ('ErrorChar', c_char), |
| 315 | ('EofChar', c_char), |
| 316 | ('EvtChar', c_char), |
| 317 | ('wReserved1', WORD), |
| 318 | ] |
| 319 | _COMMTIMEOUTS._fields_ = [ |
| 320 | ('ReadIntervalTimeout', DWORD), |
| 321 | ('ReadTotalTimeoutMultiplier', DWORD), |
| 322 | ('ReadTotalTimeoutConstant', DWORD), |
| 323 | ('WriteTotalTimeoutMultiplier', DWORD), |
| 324 | ('WriteTotalTimeoutConstant', DWORD), |
| 325 | ] |
| 326 | __all__ = ['GetLastError', 'MS_CTS_ON', 'FILE_ATTRIBUTE_NORMAL', |
| 327 | 'DTR_CONTROL_ENABLE', '_COMSTAT', 'MS_RLSD_ON', |
| 328 | 'GetOverlappedResult', 'SETXON', 'PURGE_TXABORT', |
| 329 | 'PurgeComm', 'N11_OVERLAPPED4DOLLAR_48E', 'EV_RING', |
| 330 | 'ONESTOPBIT', 'SETXOFF', 'PURGE_RXABORT', 'GetCommState', |
| 331 | 'RTS_CONTROL_ENABLE', '_DCB', 'CreateEvent', |
| 332 | '_COMMTIMEOUTS', '_SECURITY_ATTRIBUTES', 'EV_DSR', |
| 333 | 'EV_PERR', 'EV_RXFLAG', 'OPEN_EXISTING', 'DCB', |
| 334 | 'FILE_FLAG_OVERLAPPED', 'EV_CTS', 'SetupComm', |
| 335 | 'LPOVERLAPPED', 'EV_TXEMPTY', 'ClearCommBreak', |
| 336 | 'LPSECURITY_ATTRIBUTES', 'SetCommBreak', 'SetCommTimeouts', |
| 337 | 'COMMTIMEOUTS', 'ODDPARITY', 'EV_RLSD', |
| 338 | 'GetCommModemStatus', 'EV_EVENT2', 'PURGE_TXCLEAR', |
| 339 | 'EV_BREAK', 'EVENPARITY', 'LPCVOID', 'COMSTAT', 'ReadFile', |
| 340 | 'PVOID', '_OVERLAPPED', 'WriteFile', 'GetCommTimeouts', |
| 341 | 'ResetEvent', 'EV_RXCHAR', 'LPCOMSTAT', 'ClearCommError', |
| 342 | 'ERROR_IO_PENDING', 'EscapeCommFunction', 'GENERIC_READ', |
| 343 | 'RTS_CONTROL_HANDSHAKE', 'OVERLAPPED', |
| 344 | 'DTR_CONTROL_HANDSHAKE', 'PURGE_RXCLEAR', 'GENERIC_WRITE', |
| 345 | 'LPDCB', 'CreateEventW', 'SetCommMask', 'EV_EVENT1', |
| 346 | 'SetCommState', 'LPVOID', 'CreateFileW', 'LPDWORD', |
| 347 | 'EV_RX80FULL', 'TWOSTOPBITS', 'LPCOMMTIMEOUTS', 'MAXDWORD', |
| 348 | 'MS_DSR_ON', 'MS_RING_ON', |
| 349 | 'N11_OVERLAPPED4DOLLAR_484DOLLAR_49E', 'EV_ERR', |
| 350 | 'ULONG_PTR', 'CreateFile', 'NOPARITY', 'CloseHandle'] |