Redigera

Dela via


IAddrBook::SetPAB

Applies to: Outlook 2013 | Outlook 2016

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

IAddrBook::GetPAB

IAddrBook::GetSearchPath

PidTagContainerFlags Canonical Property

IAddrBook : IMAPIProp

MFCMAPI as a Code Sample