Which ReadFile parameter in this code is incorrect? (Error code 87)
问题 ( Edit: I didn't exclude any code except the headers and the main() function's brackets. Nothing is written between lines of code listed here.) . I used the ReadFile function to read this COM3 port (which returned no INVALID_HANDLE_VALUE or ERROR_FILE_NOT_FOUND): LPCTSTR portName = "COM3" ; HANDLE hSerial; hSerial = CreateFile(portName, GENERIC_READ | GENERIC_WRITE, 0, // exclusive access NULL, // default security attributes OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); And the ReadFile