+2007-09-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * WinSerialStream.cs: Fix the signature of ClearCommError.
+ Fixes #348751.
+
2008-09-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* SerialPort.cs: Throw ArgumentException if NewLine gets an empty
}
[DllImport ("kernel32", SetLastError=true)]
- static extern bool ClearCommError (int handle, out CommStat stat);
+ static extern bool ClearCommError (int handle, out uint errors, out CommStat stat);
public int BytesToRead {
get {
+ uint errors;
CommStat stat;
- if (!ClearCommError (handle, out stat))
+ if (!ClearCommError (handle, out errors, out stat))
ReportIOError (null);
return (int)stat.BytesIn;
public int BytesToWrite {
get {
+ uint errors;
CommStat stat;
- if (!ClearCommError (handle, out stat))
+ if (!ClearCommError (handle, out errors, out stat))
ReportIOError (null);
return (int)stat.BytesOut;