Opens one of the special message folders in the namespace: inbox, outbox, sent items, deleted items, and draft items. Special folders are preassigned to each namespace, and cannot be renamed, moved, or deleted.
Syntax
HRESULT OpenSpecialFolder(
SPECIALFOLDER sfType,
DWORD dwReserved,
IStoreFolder **ppFolder
);
Parameters
- sfType
-
[in] Identifies the special folder to open. Must be one of the following values:
FOLDER_INBOX- Specifies the inbox folder.
FOLDER_OUTBOX- Specifies the outbox folder.
FOLDER_SENT- Specifies the sent message folder.
FOLDER_DELETED- Specifies the deleted message folder.
FOLDER_DRAFT- Specifies the draft message folder.
- dwReserved
-
[in] Reserved value. Must be 0.
- ppFolder
-
[out] Reference to a pointer that will receive the created IStoreFolder object that represents the opened folder.
Return Value
Returns S_OK if successful, or one of the following error values.
| E_INVALIDARG | The value of dwReserved is not 0, or sfType is not one of the values specified above. |
| MSOEAPI_E_STORE_INITIALIZE | The namespace has not been initialized. To initialize the namespace, call IStoreNamespace::Initialize. |