Type T_DCB
DCBlength As Long
BaudRate As Long
fBitFields As Long ' Bits
wReserved As Integer
XonLim As Integer
XoffLim As Integer
ByteSize As Byte
Parity As Byte
StopBits As Byte
XonChar As Byte
XoffChar As Byte
ErrorChar As Byte
EofChar As Byte
EvtChar As Byte
wReserved1 As Integer
end type
declare function CREATEFILE lib "kernel32" alias "CreateFileA" (byval LPFILENAME as string,
byval DESACC as long, byval SHAREMODE as long,
byref LPSECUATTR as any, byval CREDISPOS as long,
byval FLAGSATTR as long, byval HTEMPLFILE as long) as long
declare function CLOSEHANDLE lib "kernel32" alias "CloseHandle" (byval HOBJECT as long) as long
declare function GETCOMMSTATE lib "kernel32" alias "GetCommState" (byval NCID as long,
LPDCB as T_DCB) as long
declare function SETCOMMSTATE lib "kernel32" alias "SetCommState" (byval HCOMMDEV as long,
LPDCB as T_DCB) as long