More type migration

This commit is contained in:
Benjamin Höglinger-Stelzer 2024-07-13 15:24:30 +02:00
parent a8068becba
commit 086633b8a2
3 changed files with 10 additions and 11 deletions

View File

@ -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

View File

@ -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,");
}

View File

@ -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);