2007-09-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sun, 14 Sep 2008 21:55:20 +0000 (21:55 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sun, 14 Sep 2008 21:55:20 +0000 (21:55 -0000)
* WinSerialStream.cs: Fix the signature of ClearCommError.
Fixes #348751.

svn path=/trunk/mcs/; revision=112973

mcs/class/System/System.IO.Ports/ChangeLog
mcs/class/System/System.IO.Ports/WinSerialStream.cs

index 9c5a2554fda5169f3cc3e96283dfdba0c6cdbea9..8d96f006cc48d612b2edb4617b37650ef7274308 100644 (file)
@@ -1,3 +1,8 @@
+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
index 916d45e37e4cda0c79e004d45f20acf545ae2f89..19fbfc51fbface441fb2a18e2dd33a821567adf3 100644 (file)
@@ -388,12 +388,13 @@ namespace System.IO.Ports
                }
 
                [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;
@@ -402,8 +403,9 @@ namespace System.IO.Ports
 
                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;