Migrated to CsWin32 #1
@ -21,3 +21,9 @@ WriteFile
|
||||
ESCAPE_COMM_FUNCTION
|
||||
EscapeCommFunction
|
||||
CLEAR_COMM_ERROR_FLAGS
|
||||
CE_TXFULL
|
||||
CE_PTO
|
||||
CE_IOE
|
||||
CE_DNS
|
||||
CE_OOP
|
||||
CE_MODE
|
@ -501,7 +501,7 @@ public partial class SerialPort : IDisposable
|
||||
s = s.Append("Framing,");
|
||||
}
|
||||
|
||||
if (((uint)errs & Win32Com.CE_IOE) != 0)
|
||||
if (((uint)errs & PInvoke.CE_IOE) != 0)
|
||||
{
|
||||
s = s.Append("IO,");
|
||||
}
|
||||
@ -521,7 +521,7 @@ public partial class SerialPort : IDisposable
|
||||
s = s.Append("Parity,");
|
||||
}
|
||||
|
||||
if (((uint)errs & Win32Com.CE_TXFULL) != 0)
|
||||
if (((uint)errs & PInvoke.CE_TXFULL) != 0)
|
||||
{
|
||||
s = s.Append("Transmit Overflow,");
|
||||
}
|
||||
|
@ -3,16 +3,9 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nefarius.Peripherals.SerialPort.Win32PInvoke;
|
||||
|
||||
[Obsolete("use CsWin32 instead.")]
|
||||
internal class Win32Com
|
||||
{
|
||||
//Constants for lpErrors:
|
||||
internal const UInt32 CE_TXFULL = 0x0100;
|
||||
internal const UInt32 CE_PTO = 0x0200;
|
||||
internal const UInt32 CE_IOE = 0x0400;
|
||||
internal const UInt32 CE_DNS = 0x0800;
|
||||
internal const UInt32 CE_OOP = 0x1000;
|
||||
internal const UInt32 CE_MODE = 0x8000;
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
internal static extern Boolean GetHandleInformation(IntPtr hObject, out UInt32 lpdwFlags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user