ok.. shoot me if you want..
I use this code to scan the com ports to find out which ones are there
Code:
Public Function ComPortExists(ByVal ComPort As Integer) _
As Boolean
Dim udtComConfig As COMMCONFIG
Dim lUDTSize As Long
Dim lRet As Long
lUDTSize = LenB(udtComConfig)
lRet = GetDefaultCommConfig("COM" + Trim(Str(ComPort)) + _
Chr(0), udtComConfig, lUDTSize)
ComPortExists = lRet <> 0
End Function
and use it to list in a combo box like
Code:
For n = 1 To 30
ports = ComPortExists(n)
If ports Then Combo2.AddItem n
Next n
may not help.. but thought I would post it anyway :-)
CdR
Bookmarks