If you’ve ever tried to use MFCMAPI to troubleshoot Exchange server mailbox quotas, you’re probably familiar with the properties PR_STORAGE_QUOTA_LIMIT, PR_PROHIBIT_SEND_QUOTA, and PR_PROHIBIT_RECEIVE_QUOTA. These properties live on the message store object and tell you what your various quotas are. The problem with these properties is that they only work with an online profile. If you’re working with a cached mode profile, these properties will not work. Prior to Outlook 2010, the only workaround was to either build an online profile or bypass the cache. As of Outlook 2010, there’s another option. The OST in Outlook 2010 exposes three properties which contain the same quota information as the online only properties. Development just gave me permission to document them:
#define PR_QUOTA_WARNING PROP_TAG( PT_LONG, 0x341A)#define PR_QUOTA_SEND PROP_TAG( PT_LONG, 0x341B)#define PR_QUOTA_RECEIVE PROP_TAG( PT_LONG, 0x341C)
These properties map exactly to the corresponding online properties and should contain the same values, in kilobytes. So PR_QUOTA_WARNING maps to PR_STORAGE_QUOTA_LIMIT, PR_QUOTA_SEND maps to PR_PROHIBIT_SEND_QUOTA, and PR_QUOTA_RECEIVE maps to PR_PROHIBIT_RECEIVE_QUOTA.
BTW, for completeness, if you’re looking at any of the above properties you may also be interested in PR_MAX_SUBMIT_MESSAGE_SIZE, which is the largest a message can be for submission, in kilobytes, and PR_MESSAGE_SIZE_EXTENDED, which is the size of the mailbox in bytes. Both of these properties function in cached as well as online profiles.