This documentation is archived and is not being maintained.

Starting a MAPI Session

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.

Although there is a significant amount of work performed during session start up, the required tasks are minimal. Much of this work is done in the MAPI processing of the MAPIInitialize and MAPILogonEx calls. Both of these functions accept flags as input parameters for controlling aspects of the session such as notification handling and the user interface. It is important to understand the consequences of setting each of these flags when calling MAPIInitialize to initialize the MAPI libraries and MAPILogonEx to log on to the MAPI subsystem.

To start a MAPI session

  1. Call MAPIInitialize to initialize the standard set of MAPI libraries.

  2. If you need to use the OLE libraries, call the OLE function OleInitialize.

  3. If you need to use the MAPI utility library, call ScInitMapiUtil.

  4. Call MAPILogonEx with a valid profile to log on to the MAPI subsystem. MAPILogonEx verifies the configuration of each of the service providers in the message services included in the profile, prompting the user for additional information if necessary and possible. When MAPILogonEx completes, the configured service providers are ready for service.

Initializing MAPI

Describes how to initialize MAPI for a session.

Initializing OLE for MAPI

Describes the calls to make to initialize OLE for use with MAPI.

Initializing the MAPI Utilities

Describes how to initialize MAPI utilities.

Logging on to MAPI

Describes how client applications log on to the MAPI sub system.