Default connection

Apr 16, 2009 at 12:24 AM
Is the concept of the "default connection" something that is exposed through RAS?

I'm trying to figure out if I can somehow determine which phonebook entry to use if that has been marked as the default connection (in the Network Connections UI).

-dave
Apr 16, 2009 at 12:42 AM
A bit of searching and it appears the answer is "Yes".. http://msdn.microsoft.com/en-us/library/aa377485(VS.85).aspx.

Calling GetAddress(null) on the RasAutoDialManager does work, but maybe it would be nice to add a separate method - GetAddress() or GetDefaultAddress() come to mind, to expose this in a more obvious way?

thanks,
-dave
Coordinator
Apr 16, 2009 at 1:11 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 16, 2009 at 1:18 AM
I completely agree.

That particular component was rushed simply because I didn't think anyone would even need it. Apparently I was wrong, which is a good thing. I don't know if that would be any more helpful, not sure if people would even think of looking on that component to try and figure out what the default connection is. I'm going to add one for setting and clearing the default entry as well.
Coordinator
May 10, 2009 at 2:39 AM

Not sure if you'd be interested, but I finished the redesign for the component. The Addresses collection on the manager now contains a collection of RasAutoDialAddress objects and works the same as the RasPhoneBook component does with the entries. Adding or removing objects from this collection will add/remove the address from the AutoDial database. Using an empty string for the address will set the default connection you were trying to use.

I still need to get the intellisense updated for the component, but right now that is how it works. In order to set the default connection, you must also only provide 1 single entry in the address' entries collection. This is just something required by Windows.