Closed GoogleCodeExporter closed 9 years ago
i use following patch to fix this issue.
--- win_qextserialport.cpp Thu Sep 6 00:47:20 2007
+++ win_qextserialport-patched.cpp Mon Sep 20 17:11:27 2010
@@ -187,6 +187,7 @@
Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, dwFlagsAndAttributes, NULL);
if (Win_Handle!=INVALID_HANDLE_VALUE) {
+ QIODevice::open(mode);
/*configure port settings*/
GetCommConfig(Win_Handle, &Win_CommConfig, &confSize);
GetCommState(Win_Handle, &(Win_CommConfig.dcb));
@@ -216,11 +217,11 @@
if (!SetCommMask( Win_Handle, EV_TXEMPTY | EV_RXCHAR | EV_DSR)) {
qWarning("Failed to set Comm Mask. Error code: %ld", GetLastError());
UNLOCK_MUTEX();
+ QIODevice::close();
return false;
}
overlapThread->start();
}
- QIODevice::open(mode);
}
} else {
UNLOCK_MUTEX();
Original comment by maxillus...@gmail.com
on 22 Sep 2010 at 3:30
Thanks
Original comment by dbzhang...@gmail.com
on 16 Mar 2012 at 8:15
Original issue reported on code.google.com by
seth...@web.de
on 24 Aug 2010 at 12:48