The GetReceiveFolder method 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.
HRESULT GetReceiveFolder ( LPTSTR lpszMessageClass, ULONG ulFlags, ULONG FAR * lpcbEntryID, LPENTRYID FAR * lppEntryID, LPTSTR FAR * lppszExplicitClass );
[in] Not used; must be NULL.
[in] Not used; must be zero or MAPI_UNICODE.
[out] Reference to the count of bytes in the entry identifier pointed to by lppEntryID.
[out] Reference to the entry identifier for the requested receive folder.
[out] Not supported; must be NULL.
GetReceiveFolder obtains the entry identifier of a receive folder. You must specify NULL in the lpszMessageClass parameter. A default receive folder (obtained by passing NULL in the lpszMessageClass parameter) always exists for every message store.
To free the memory that holds that entry identifier, a client should call the MAPIFreeBuffer function when it is done with the entry identifier returned in lppEntryID.