This project is read-only.

How to retrieve names of all the dial-up-connections which are connected to the system?

Jul 23, 2009 at 8:16 AM



i am trying to create an application in which i have to show all the dial-up connections connected to the system but i am not able to do that.

Can anyone help me out and suggest some solution?

Pls provide the solution.

Thanks in advance!

Jul 23, 2009 at 3:02 PM

The RasDialer component has a method called GetActiveConnections that will give you any connections that are active on the system. If you want to know what type of entry they are, you can probably look at the type of device used by the connection.

foreach (RasConnection connection in RasDialer.GetActiveConnections())
    if (connection.Device.DeviceType == RasDeviceType.Modem)
        // The device is a dial-up connection.

Granted there are other devices that support dial-up style systems, you just need to figure out which of those you want to look for. You can also use the RasPhoneBook and look at the entry directly. This method will require a lot more overhead than the previous example.