Serial port and handling errors during overlapped I/O operations
问题 I've been doing serial communications lately so I prepared a class being a simple interface to all those Windows API functions responsible for reading, writing, etc. All I/O operations inside this class are handled asynchronously. Before I go to my question, let me show you how I write and read data from serial port (this is only the reading function, because the structure of the writing one is exactly the same so there is no point in presenting both of them). function TSerialPort.Read(var