|
Imports System Imports System.Runtime.InteropServices Namespace JustinIO Class CommPort Public PortNum As String Public BaudRate As Integer Public ByteSize As Byte Public Parity As Byte ´// 0-4=no,odd,even,mark,space Public StopBits As Byte ´// 0,1,2 = 1, 1.5, 2 Public ReadTimeout As Integer ´//comm port win32 file handle Private hComm As Integer = -1 Public Opened As Boolean = False ´//win32 api constants Private Const GENERIC_READ As Int64 = &H80000000 Private Const GENERIC_WRITE As Int64 = &H40000000 Private Const OPEN_EXISTING As Integer = 3 Private Const INVALID_HANDLE_VALUE As Integer = -1 #Region "struct" <StructLayout(LayoutKind.Sequential)> _ Public Structure DCB &nb [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|