Partager via


IAddrBook::SetDefaultDir

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.

Establishes the specified container as the default address book container that is initially made available.

HRESULT SetDefaultDir(
  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 default address book container.

Return Value

  • S_OK
    The default address book container was successfully set.

Remarks

Clients and service providers call the SetDefaultDir method to establish a new default address book container. The default container is the container that the user sees displayed in the address book when the address book is first opened. SetDefaultDir saves the default container as an entry in the profile. The container remains as the default until either another call to SetDefaultDir is made in the same session or in another session, or the container is removed.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

Abcontdlg.cpp

CabContDlg::OnSetDefaultDir

MFCMAPI uses the SetDefaultDir method to make the specified address book container the default one.

See Also

Reference

IAddrBook::GetDefaultDir

IAddrBook::GetSearchPath

IMAPISession::Logoff

MAPILogonEx

IAddrBook : IMAPIProp

Concepts

MFCMAPI as a Code Sample