Migrated mroe code
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nefarius.Peripherals.SerialPort.Win32PInvoke
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct COMMPROP
|
||||
{
|
||||
internal UInt16 wPacketLength;
|
||||
internal UInt16 wPacketVersion;
|
||||
internal UInt32 dwServiceMask;
|
||||
internal UInt32 dwReserved1;
|
||||
internal UInt32 dwMaxTxQueue;
|
||||
internal UInt32 dwMaxRxQueue;
|
||||
internal UInt32 dwMaxBaud;
|
||||
internal UInt32 dwProvSubType;
|
||||
internal UInt32 dwProvCapabilities;
|
||||
internal UInt32 dwSettableParams;
|
||||
internal UInt32 dwSettableBaud;
|
||||
internal UInt16 wSettableData;
|
||||
internal UInt16 wSettableStopParity;
|
||||
internal UInt32 dwCurrentTxQueue;
|
||||
internal UInt32 dwCurrentRxQueue;
|
||||
internal UInt32 dwProvSpec1;
|
||||
internal UInt32 dwProvSpec2;
|
||||
internal Byte wcProvChar;
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,7 @@ namespace Nefarius.Peripherals.SerialPort.Win32PInvoke
|
||||
[DllImport("kernel32.dll")]
|
||||
internal static extern Boolean GetHandleInformation(IntPtr hObject, out UInt32 lpdwFlags);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Manipulating the communications settings.
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Reading and writing.
|
||||
/// </summary>
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
internal static extern Boolean WriteFile(IntPtr fFile, Byte[] lpBuffer, UInt32 nNumberOfBytesToWrite,
|
||||
out UInt32 lpNumberOfBytesWritten, IntPtr lpOverlapped);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
internal static extern Boolean SetCommMask(IntPtr hFile, UInt32 dwEvtMask);
|
||||
|
||||
@@ -100,7 +89,6 @@ namespace Nefarius.Peripherals.SerialPort.Win32PInvoke
|
||||
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 GetCommProperties(IntPtr hFile, out COMMPROP cp);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user