IMAPIMessageSite::GetSession

Last modified: July 23, 2011

Applies to: Outlook

Returns the MAPI session in which the current message was created or opened.

HRESULT GetSession(
  LPMAPISESSION FAR * ppSession
);

ppSession

[out] A pointer to a pointer to the returned session object.

S_OK

The call succeeded and has returned the expected value or values.

S_FALSE

No session exists for the current message.

For a list of interfaces that are related to form servers, see MAPI Form Interfaces.

For MFCMAPI sample code, see the following table.

File

Function

Comment

MyMAPIFormViewer.cpp

CMyMAPIFormViewer::GetSession

MFCMAPI uses the IMAPIMessageSite::GetSession method to return the currently cached session pointer, if it is available.

Show:
© 2016 Microsoft