diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2008-09-15 01:55:20 +0400 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2008-09-15 01:55:20 +0400 |
commit | 6506016e1c88348443e4a4db700dbfb17dbc4ef1 (patch) | |
tree | 0f26910e7a8b3d53925bb3821b447fb9c4c3c409 /mcs/class/System/System.IO.Ports | |
parent | 45bc5d51ba89635980b0e14df4d2faf0a09cc12e (diff) |
2007-09-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* WinSerialStream.cs: Fix the signature of ClearCommError.
Fixes #348751.
svn path=/trunk/mcs/; revision=112973
Diffstat (limited to 'mcs/class/System/System.IO.Ports')
-rw-r--r-- | mcs/class/System/System.IO.Ports/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System/System.IO.Ports/WinSerialStream.cs | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/mcs/class/System/System.IO.Ports/ChangeLog b/mcs/class/System/System.IO.Ports/ChangeLog index 9c5a2554fda..8d96f006cc4 100644 --- a/mcs/class/System/System.IO.Ports/ChangeLog +++ b/mcs/class/System/System.IO.Ports/ChangeLog @@ -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 diff --git a/mcs/class/System/System.IO.Ports/WinSerialStream.cs b/mcs/class/System/System.IO.Ports/WinSerialStream.cs index 916d45e37e4..19fbfc51fbf 100644 --- a/mcs/class/System/System.IO.Ports/WinSerialStream.cs +++ b/mcs/class/System/System.IO.Ports/WinSerialStream.cs @@ -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; |