Working with Folder Objects

Newly created folders have the following special characteristics:

Access Rights Needed for GetProps and SetProps

You can call IMAPIProp::GetProps if you have read-only access, and you need owner access to call IMAPIProp::SetProps. Certain replication properties require administrator’s rights to the site object in order to set them. For more information about accessing objects in the information store, see About Information Store Security.

SaveContentsSort

The IMAPIFolder::SaveContentsSort method is not implemented by the Microsoft Exchange Server information store provider and will return MAPI_E_NO_SUPPORT if called. Normally, calling this method stores the messages within a folder in a given sort order. In this case, Microsoft Exchange Server automatically caches indices on an LRU (least recently used) basis and automatically saving the sorted list to disk for future use. This makes calling SaveContentsSort unnecessary.

Notes on Folder Usage

Additional Folder Property Interfaces

These complex folder properties are objects and are accessed as such. You can open them like any other object, and an interface is returned.

Folder Property Interface
PR_HIERARCHY_SYNCHRONIZER IExchangeImportHierarchyChanges
PR_COLLECTOR IExchangeExportChanges
PR_CONTENTS_SYNCHRONIZER IExchangeExportChanges
PR_RULES_TABLE IExchangeModifyTable
PR_ACL_TABLE IExchangeModifyTable

Using Contents Tables

A contents table lists summary information about mail user or Distribution-List objects in address book containers, or about messages in folders. Address book providers implement contents tables for each of their containers. Both information store and remote transport providers implement contents tables for folders. For more information, see the MAPI Programmer’s Reference.

The following topics apply to the use of contents tables.

Sorting Limitations

The Microsoft Exchange Server information store provider supports sorting on the PR_NORMALIZED_SUBJECT and PR_SUBJECT_PREFIX properties, but not on the PR_SUBJECT property. Clients are expected to sort on the PR_NORMALIZED_SUBJECT property. For example, a call to IMAPITable::SortTable with PR_SUBJECT as the key fails on EMS_PRIVATE (and returns the error MAPI_E_TOO_COMPLEX), while the PST provider supports this call.

Truncation

In contents tables (returned with QueryRows), the Microsoft Exchange Server information store provider truncates both binary and text properties.