IMsgStore::SetReceiveFolder
The IMsgStore::SetReceiveFolder
method establishes a folder as the destination for incoming messages of a
particular message class.
Quick Info
See IMsgStore
: IMAPIProp
HRESULT SetReceiveFolder(
LPTSTR lpszMessageClass, |
|
ULONG ulFlags,
|
|
ULONG cbEntryID,
|
|
LPENTRYID lpEntryID |
|
) |
|
Parameters
lpszMessageClass
[in] Pointer
to the message class that is to be associated with the new receive folder. If
the lpszMessageClass parameter is set to NULL or an empty string, SetReceiveFolder
sets the default receive folder for the message store.
ulFlags
[in] Bitmask
of flags that controls the type of the text in the passed-in strings. The
following flag can be set:
MAPI_UNICODE
The message
class string is in Unicode format. If the MAPI_UNICODE flag is not set, the
message class string is in ANSI format.
cbEntryID
[in] Count of
bytes in the entry identifier pointed to by the lpEntryID parameter.
lpEntryID
[in] Pointer
to the entry identifier of the folder to establish as the receive folder. If
the lpEntryID parameter is set to NULL, SetReceiveFolder replaces
the current receive folder with the message store s default.
Return Value
S_OK
A receive
folder was successfully established.
Remarks
The IMsgStore::SetReceiveFolder
method sets or changes the receive folder for a particular message class. With SetReceiveFolder,
a client can, by using successive calls, specify a different receive folder for
each message class defined or specify that incoming messages for multiple message
classes all go to the same folder. A client can, for example, have its own
class of messages arrive in its own folder. For instance, a fax application can
designate a folder where the store provider places incoming faxes and one where
the provider places outgoing faxes.
If an error
occurs while calling SetReceiveFolder, the receive folder setting
remains unchanged.
If SetReceiveFolder
changes the receive folder setting with lpEntryID set to NULL,
indicating the default receive folder should be set, SetReceiveFolder
returns S_OK even if there was no existing setting for the indicated message
class.