Starting a MAPI Session

Last modified: July 23, 2011

Applies to: Outlook

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.

Show:
© 2014 Microsoft