Platform SDK: MAPI

Avoid Certain Methods at Startup

To improve performance at startup time, avoid making the following calls:

IMAPISession::EnumAdrTypes IMAPISession::Logoff
IMAPISession::GetStatusTable IMAPISession::MessageOptions
IMAPISession::QueryDefaultMessageOpt IMAPIStatus::ValidateState
IMAPISession::QueryIdentity IUnknown::Release

The call to IMAPIStatus::ValidateState affects performance only when made on either the MAPI spooler or the MAPI subystem. The reason that these methods slow start up processing is because they cannot complete until the MAPI spooler has finished its startup tasks.

Another task to avoid at startup is searching the message store. Make your IMAPIContainer::SetSearchCriteria call when startup processing has finished.