The DotRas SDK has a component that handles the management of phone book entries. Keep in mind that Windows uses two phone books, one of which concerns the profile of all users and the profile of current users. Therefore, if you are trying to get a list of all the entries that you see there, you will need to access both books.
using DotRas; RasPhoneBook pbk = new RasPhoneBook(); pbk.Open(@"C:\PathToYourPhoneBook.pbk"); // NOTE: You can also use RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.AllUsers) to // access the path as defined by the Windows SDK rather than having to hard-code it. foreach (RasEntry entry in pbk.Entries) { // Do something useful. }
The above example is pretty limited, so check out the examples included in the SDK for more complete examples.
To download links to the aforementioned SDK, see the official website at: http://dotras.codeplex.com
Hope this helps!
source share