Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The GetReceiveFoldermethod obtains the folder that was established as the destination for incoming messages of a specified message class or the default receive folder for the message store.

Syntax

HRESULT GetReceiveFolder (
  LPTSTR 
lpszMessageClass,
  ULONG 
ulFlags,
  ULONG FAR * 
lpcbEntryID,
  LPENTRYID FAR * 
lppEntryID,
  LPTSTR FAR * 
lppszExplicitClass
);

Parameters

lpszMessageClass

[in] Not used; must be NULL.

ulFlags

[in] Not used; must be zero or MAPI_UNICODE.

lpcbEntryID

[out] Reference to the count of bytes in the entry identifier pointed to by lppEntryID.

lppEntryID

[out] Reference to the entry identifier for the requested receive folder.

lppszExplicitClass

[out] Not supported; must be NULL.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK

Indicates success.

Remarks

GetReceiveFolderobtains the entry identifier of a receive folder. You must specify NULLin the lpszMessageClassparameter. A default receive folder (obtained by passing NULLin the lpszMessageClassparameter) always exists for every message store.

To free the memory that holds that entry identifier, a client should call the MAPIFreeBufferfunction when it is done with the entry identifier returned in lppEntryID.

Requirements

Header mapidefs.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

IMsgStore
MAPIFreeBuffer

Other Resources

Messaging