Partager via


IAddrBook::SetPAB

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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