---snip---
Private Sub LoadModemList()
Try
Dim mngSearch As New ManagementObjectSearcher("Select *
From Win32_POTSModem")
Dim mngColl As ManagementObjectCollection = mngSearch.Get
Dim mngObj As ManagementObject
For Each mngObj In mngColl
Debug.WriteLine(CType(mngObj.Item("AttachedTo"),
String) & " - " & CType(mngObj.Item("Name"), String))
Next
Catch ex As Exception
End Try
End Sub
---snip---
Remember to add a reference to System.Management in your project
in order to access the objects in the System.Management namespace.
The sample is nearly two years old. Perhaps there is something better
in VS2005?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.