![]() |
IAddrBook::ResolveName() problems
1. If there are two similar contacts with names: "NN" and "NN " in Outlook
address book (second name with gap after letters), and I call ResolveName() with parameter PR_DISPLAY_NAME = "NN", function can't resolve names and show dialog (if MAPI_DIALOG flag was set). Function must find the contact without the dialog been shown, as 'NN' and 'NN ' (with gap after) are really distinct names. 2. If there are two contacts, one of which is substring of another: for example, "Jane" and "Jane L" and function ResolveName() was called to find "Jane", it can't resolve names too (see 1). Function must find the contact without the dialog been shown, as 'Jane' and 'Jane L' are really distinct names. 3. If there are two contacts with coincident names, but in diffrent folders, ResolveName() stopped at the first founded contact. But dialog 'select name' should be appear. 4. If display name looks like e-mail: for example, , ResolveName() can't find contact at all. How can I handle this particularities ? |
IAddrBook::ResolveName() problems
1. If you get an ambiguous name, you can perform a PR_ANR restriction on an
AB container (such as GAL) that you are interested in. 2. Must? That is not how it worked for the last 15 years or so. 3. That is just how name resolution is implemeted. MAPI loops through all AB providers in the search path (remember you can have multiple independent providers) and stops at the very first one that returns success or an ambiguous name. In case of an ambiguous name, it performs PR_ANR restriciton on that container and uses the returned entries to display the "Ambiguous name" dialog. 4. Can't find as in "returns an error"? Or as in "returns a one-off entry"? Which AB provider is that? Remember that MAPI itself does not resolve a name, a particular address book provider does. and each one of them can have a different implementation. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Sergeichik" wrote in message ... 1. If there are two similar contacts with names: "NN" and "NN " in Outlook address book (second name with gap after letters), and I call ResolveName() with parameter PR_DISPLAY_NAME = "NN", function can't resolve names and show dialog (if MAPI_DIALOG flag was set). Function must find the contact without the dialog been shown, as 'NN' and 'NN ' (with gap after) are really distinct names. 2. If there are two contacts, one of which is substring of another: for example, "Jane" and "Jane L" and function ResolveName() was called to find "Jane", it can't resolve names too (see 1). Function must find the contact without the dialog been shown, as 'Jane' and 'Jane L' are really distinct names. 3. If there are two contacts with coincident names, but in diffrent folders, ResolveName() stopped at the first founded contact. But dialog 'select name' should be appear. 4. If display name looks like e-mail: for example, , ResolveName() can't find contact at all. How can I handle this particularities ? |
IAddrBook::ResolveName() problems
3. That is just how name resolution is implemeted. MAPI loops through all AB providers in the search path (remember you can have multiple independent providers) and stops at the very first one that returns success or an ambiguous name. In case of an ambiguous name, it performs PR_ANR restriciton on that container and uses the returned entries to display the "Ambiguous name" dialog. How can I find all contacts with particular name (fom all folders) ? |
IAddrBook::ResolveName() problems
All contacts from conatcts folders in a particular store?
All address entries from all address book containers in the address book? The two are different as you can have a contacts folder in a store that does not show up in the address book ("Show in teh address book" checkbox is nto checked). Plus you can have other AB providers (such as GAL) that have nothign to do with contact messages in a message store. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Sergeichik" wrote in message ... 3. That is just how name resolution is implemeted. MAPI loops through all AB providers in the search path (remember you can have multiple independent providers) and stops at the very first one that returns success or an ambiguous name. In case of an ambiguous name, it performs PR_ANR restriciton on that container and uses the returned entries to display the "Ambiguous name" dialog. How can I find all contacts with particular name (fom all folders) ? |
IAddrBook::ResolveName() problems
"Dmitry Streblechenko" wrote:
All contacts from conatcts folders in a particular store? All address entries from all address book containers in the address book? All contacts that can be available to user from Outlook Address book. |
IAddrBook::ResolveName() problems
Opne the address book, open the root container, (IAddrBook::OpenEntry(0,
NULL, ...)), get all the subcontainers (IABContainer::GetHierarchyTable). For each container, open it (IAddrBook::OpenEntry - get back IABContainer), get the contents table (IABContainer::GetContentsTable), perform PR_ANR restriction (IMAPITable::Restrict). -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Sergeichik" wrote in message ... "Dmitry Streblechenko" wrote: All contacts from conatcts folders in a particular store? All address entries from all address book containers in the address book? All contacts that can be available to user from Outlook Address book. |
All times are GMT +1. The time now is 12:31 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com