Share via


IMAPIMessageSite::GetFolder

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Returns the folder in which the current message was created or opened, if such a folder exists. This method returns NULL in the ppFolder parameter for embedded messages, which are not stored directly in a folder.

HRESULT GetFolder(
  LPMAPIFOLDER FAR * ppFolder
);

Parameters

  • ppFolder
    [out] A pointer to a pointer to the returned folder.

Return Value

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

  • S_FALSE
    No folder exists for the 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::GetFolder

MFCMAPI uses the IMAPIMessageSite::GetFolder method to return the currently cached pointer to the specified folder.

See Also

Reference

IMAPIMessageSite : IUnknown

Concepts

MFCMAPI as a Code Sample

MAPI Form Interfaces