IMAPISession::Logoff
Last modified: June 25, 2012
Applies to: Outlook
Ends a MAPI session.
HRESULT Logoff( ULONG_PTR ulUIParam, ULONG ulFlags, ULONG ulReserved );
The IMAPISession::Logoff method ends a MAPI session. When Logoff returns, none of the methods except for IUnknown::Release can be called.
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.
For MFCMAPI sample code, see the following table.
|
File |
Function |
Comment |
|---|---|---|
|
MAPIObjects.cpp |
CMapiObjects::Logoff |
MFCMAPI uses the IMAPISession::Logoff method to log off from the session before releasing it. |
Note
|
|---|
|
Due to the fast shutdown behavior introduced in Microsoft Office Outlook 2007 Service Pack 2, Microsoft Outlook 2010, and Microsoft Outlook 2013, clients should never pass the MAPI_LOGOFF_SHARED parameter to IMAPISession::Logoff. Passing MAPI_LOGOFF_SHARED will cause all MAPI clients to begin shutdown and unexpected behavior will occur. |
Note