アドレス帳の検索

適用対象: Outlook 2013 | Outlook 2016

MAPI �ł́A�����@�\�� 2 �‚̃��x�����������A�h���X���̃v���o�C�_�[���L���ɂ��܂��B

  • 指定した名前とアドレス帳エントリの PR_DISPLAY_NAME (PidTagDisplayName) プロパティと一致する基本レベル。 このレベルでは、たとえば、名前が Northwest で始まる配布リストを表示したり、姓が Brown の個々のメッセージング ユーザーを見つけたりできます。

  • PR_DISPLAY_NAME以外のプロパティに一致する高度なレベル。 このレベルでは、たとえば、ユーザーが検索をさらに絞り込み、特定のアドレスの種類を持つ Brown という名前のメッセージング ユーザーを見つけることができます。

Because address book providers can support searching for each of their containers at the basic level, at both levels, or choose not to support it at all, do not expect searching to be implemented as a standard feature. To determine if a particular container supports searches, attempt to establish search criteria in a call to its IMAPIContainer::SetSearchCriteria method. If SetSearchCriteria returns MAPI_E_NO_SUPPORT, the container does not support searches.

In a container that supports searches, retrieve established criteria by calling IMAPIContainer::GetSearchCriteria. You can also request that the user be prompted for search criteria before a container's contents table is displayed. このオプションを選択するには、コンテナーのPR_CONTAINER_FLAGS (PidTagContainerFlags) プロパティのAB_FIND_ON_OPEN フラグを設定します。 After the user enters the criteria, it is stored as a restriction and passed to the SetSearchCriteria method. Setting AB_FIND_ON_OPEN is particularly useful if you are using an online service or any address book provider that has a slow link to its data.

�A�h���X���R���e�i�[�̊�{�I�Ȍ�������s����ɂ�

  1. ���̓�e�̃e�[�u����J�����߂̃R���e�i�[��IMAPIContainer::GetContentsTable���\�b�h��Ăяo���܂��B

  2. ニーズに合った検索手法を選択します。 選択肢は次のとおりです。

    • �\��̓���̍s���������IMAPITable::FindRow�ɂ��܂��B

    • �e�[�u���̍s�̏�����IMAPITable::SortTable�ɂ��܂��B

    • �\�`���r���[�𐧌�����IMAPITable::Restrict�ɂ��܂��B

    • あいまいな名前を解決するための PR_ANR (PidTagAnr) プロパティを使用したプロパティ制限。 IMAPITable::Restrict を呼び出して、この制限を適用します。

    • �����܂��Ȗ��O��������̂ɂ�IABContainer::ResolveNames�ɂ��܂��B

  3. IMAPITable::QueryRows を呼び出して、適用した検索条件を満たす行を取得します。 QueryRows は、 0 個以上の一致する行を返すことができます。

The FindRow, SortTable, and Restrict methods are table methods that are available for any table that can be created, either by a client or a service provider. The PR_ANR property restriction and IABContainer::ResolveNames method are specific to address book providers and are used for resolving ambiguous names. Ambiguous names are entries in a recipient list that do not have a PR_ENTRYID property associated with them.

The PR_ANR restriction invokes an algorithm that separates a character string into words and matches those words with information in the address book using prefix-matching. The information used for the matching depends on the address book provider. All address book providers are required to support the PR_ANR restriction for their address book containers. For more information, see Implementing Name Resolution.

IABContainer::ResolveNames は、コンテナーのコンテンツ テーブル 開く必要なく、複数の名前に対してPR_ANR制限処理を実行します。 ResolveNames を 1 回呼び出して複数の名前を解決すると、PR_ANR制限を複数回呼び出すよりもはるかに高速になる可能性があります。 ただし、 ResolveNames をサポートするためにアドレス帳プロバイダーは必要ありません。