Share via


IMAPIMessageSite::GetSession

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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

HRESULT GetSession(
  LPMAPISESSION FAR * ppSession
);

Parameters

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

Return Value

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

  • S_FALSE
    No session exists for the current message.

Remarks

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

MFCMAPI Reference

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.

See Also

Reference

IMAPIMessageSite : IUnknown

Concepts

MFCMAPI as a Code Sample