次の方法で共有


IAddrBook::SetPAB

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Designates a particular container as the personal address book (PAB).

HRESULT SetPAB(
  ULONG cbEntryID,
  LPENTRYID lpEntryID
);

Parameters

  • cbEntryID
    [in] The byte count in the entry identifier pointed to by the lpEntryID parameter.

  • lpEntryID
    [in] A pointer to the entry identifier of the container to be designated as the PAB. The lpEntryID parameter cannot be NULL.

Return Value

  • S_OK
    The specified container has been established as the PAB.

Remarks

Clients and service providers call the SetPAB method to designate a particular container as the PAB. The PAB is a container that consists of entries copied from other containers as well as new entries.

A call to SetPAB establishes a container as the PAB until that container is made unavailable or a new container becomes the PAB through a subsequent call to SetPAB .

Clients and providers do not have to call the IMAPIProp::SaveChanges method to make the PAB change permanent.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

AbContDlg.cpp

CAbContDlg::OnSetPAB

MFCMAPI uses the SetPAB method to make the specified container the PAB.

See Also

Reference

IAddrBook::GetPAB

IAddrBook::GetSearchPath

PidTagContainerFlags Canonical Property

IAddrBook : IMAPIProp

Concepts

MFCMAPI as a Code Sample