Hi,
You can use the wmi for that. The win32_portconnector class
contains the info you are looking for. Add a reference to
system.management.
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_PortConnector")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strOut As String
strOut = mo("ExternalReferenceDesignator").ToString
If strOut.Length < 1 Then
strOut = mo("InternalReferenceDesignator").ToString
End If
Debug.WriteLine(strOut)
Next
http://msdn.microsoft.com/library/de...tconnector.asp
Ken
----------------------
"EMW" <so*****@MikroZoft.com> wrote in message
news:42********************@dreader2.news.tiscali. nl...
Hi,
I'm looking for a way to get a list of all the com ports on a pc.
It doesn't matter if they are free or not or if they are virtual of
physical.
Who can help me?
I've tried google, but nothing clear yet...
rg,
Eric