Reputation: 1263
I'm looking a way to extract all contacts and distribution list (with related contacts) from a WAB (Windows Address Book).
I need to do this because I need to import address books, with distribution lists/groups, in roundcube.
After some research, I've founded a C++ project on Code Project ( http://www.codeproject.com/Articles/3407/Accessing-the-Windows-Address-Book ), but this support only contacts.
Looking around on MSDN I've founded that the OpenEntry method of iAddrBook should support in the third parameter the interface to open, iDistList in my case, but I can't find anywhere the interface id.
I searched some documentation abount WAB file structure, but nothing.
Any suggestions?
Upvotes: 0
Views: 593
Reputation: 49976
Here is a path I used to acomplish this:
the last OpenEntry looks as follows, I do not set third parameter anywhere:
// Now emails will be loaded.
ULONG ulObjType;
IUnknown* lpUnk;
hr = lpAdrBook->OpenEntry(DistEntryId.size, (LPENTRYID)DistEntryId.ab, NULL, 0, &ulObjType, &lpUnk );
if (FAILED(hr)) {
assert(false); return hr;
}
Upvotes: 1