IMAPISession::Logoff
The IMAPISession::Logoff method ends a MAPI session.
Quick Info
See IMAPISession : IUnknown.
HRESULT Logoff(
ULONG ulUIParam,
ULONG ulFlags,
ULONG ulReserved
);
Parameters
-
ulUIParam
-
[in] Handle of the parent window for any dialog boxes or windows to be displayed if possible. This parameter is ignored if the MAPI_LOGOFF_UI flag is not set.
-
ulFlags
-
[in] Bitmask of flags that control the logoff operation. The following flags can be set:
-
MAPI_LOGOFF_SHARED
-
If this session is shared, all clients logged on using the shared session should be notified of the logoff in progress. The clients should log off. Any client using the shared session can set this flag. MAPI_LOGOFF_SHARED is ignored if the current session is not shared.
-
MAPI_LOGOFF_UI
-
Logoff can display a dialog box during the operation, possibly prompting the user for confirmation.
-
ulReserved
-
Reserved; must be zero.
Return Values
-
S_OK
-
The logoff operation was successful.
Remarks
The IMAPISession::Logoff method ends a MAPI session. When Logoff returns, none of the methods except for Release can be called. IMAPISession::Logoff is similar in functionality to the Simple MAPI function MAPILogoff.
Notes to Callers
When Logoff returns, release the session object by calling its IUnknown::Release method.
For more information about ending a session, see Ending a MAPI Session.
See Also
MAPILogoff