Explicit Logon with Simple MAPI

A client application logs on explicitly by calling the MAPILogon function. MAPILogon automatically opens the default address book for the Simple MAPI caller. When MAPILogon returns, the session is ready to service all messaging requests. The default message store provider is loaded and opened by the first Simple MAPI call that needs the message store.

The session handle produced by MAPILogon represents the MAPI session that you can use in further Simple MAPI calls. This session handle is passed to most Simple MAPI calls and can also be used with MAPI. The ScMAPIXFromSMAPI support method, prototyped in the MAPI.H file, converts a Simple MAPI session handle into a MAPI session object pointer. It is not possible to convert a Simple MAPI session handle into a CMC session handle. Clients needing both Simple MAPI and CMC functionality must maintain separate sessions for each.

Simple MAPI function calls produce return values that provide information about the success of a call. These return values are unsigned long values. Successful calls return the SUCCESS_SUCCESS value. Unsuccessful calls return error values starting with MAPI_E_, such as MAPI_E_INSUFFICIENT_MEMORY.