-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathEnuSerial.bas
More file actions
executable file
·38 lines (34 loc) · 899 Bytes
/
Copy pathEnuSerial.bas
File metadata and controls
executable file
·38 lines (34 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Attribute VB_Name = "EnuSerial"
Option Explicit
' DCB to check for installed comm ports
'
Public Type DCB
DCBlength As Long
BaudRate As Long
fBitFields As Long
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
Public Type COMMCONFIG
dwSize As Long
wVersion As Integer
wReserved As Integer
dcbx As DCB
dwProviderSubType As Long
dwProviderOffset As Long
dwProviderSize As Long
wcProviderData As Byte
End Type
' Required to find all serial ports on a system
Declare Function GetDefaultCommConfig Lib "kernel32" Alias "GetDefaultCommConfigA" _
(ByVal lpszName As String, lpCC As COMMCONFIG, lpdwSize As Long) As Long