MAPILogonEx
Published: July 16, 2012
Logs a client application on to a session with the messaging system.
|
Header file: |
Mapix.h |
|
Implemented by: |
MAPI |
|
Called by: |
Client applications |
HRESULT MAPILogonEx( ULONG_PTR ulUIParam, LPSTR lpszProfileName, LPSTR lpszPassword, FLAGS flFlags, LPMAPISESSION FAR * lppSession );
MAPI client applications call the MAPILogonEx function to log on to a session with the messaging system. All strings that are passed in and returned to and from MAPI calls are null-terminated and must be specified in the current character set or code page of the calling client or provider's operating system.
The lpszProfileName parameter is ignored if there is an existing previous session that called MapiLogonEx with the MAPI_ALLOW_OTHERS flag set and if the flag MAPI_NEW_SESSION is not set. If the lpszProfileName parameter is NULL or points to an empty string, and the flFlags parameter includes the MAPI_LOGON_UI flag, the MAPILogonEx function generates a logon dialog box that has an empty field for the profile name.
When logging on to a specific profile, a client should pass the MAPI_NEW_SESSION flag into MAPILogonEx in addition to the profile name. Otherwise, if another client has established a shared session by logging on with MAPI_ALLOW_OTHERS, the client will be logged on to the shared session instead of to the profile requested.
The MAPI_EXPLICIT_PROFILE flag does not cause the default profile name to be used when lpszProfileName is NULL or empty unless the MAPI_USE_DEFAULT flag is also present.
The MAPI_NO_MAIL flag has several effects that cause the following when not using the MAPI spooler:
-
No messages can be sent or delivered by the MAPI spooler during this session. Only tightly coupled store and transport providers can send and deliver messages.
-
Server based stores might still send or deliver messages.
-
Messages sent or delivered by server based stores are not processed by any hook providers.
-
Per-message and per-recipient options for transports are not available.
-
The status table does not contain entries for transport providers, and any transport functionality dependent on status objects (such as configuration) is not available.
-
The message spooler row in the status table contains the STATUS_FAILURE value.
-
Piggybacked logons are allowed, but those logons do not cause the previous logon to receive status object updates.
A service should always log on using the MAPI_NO_MAIL flag.