A fellow engineer recently asked me how to set custom properties on a folder object in a PST. I reminded him that folders in the PST provider don’t support named properties. He was surprised to hear this. I was surprised to learn that this hadn’t actually been documented before. (If anyone can produce a link to previous documentation on this I’d be grateful!)
Neither the Exchange provider (emsmdb32.dll) or the PST provider (mspst32.dll) support named properties on folders. Both will allow you to call GetIDsFromNames and GetNamesFromIDs, but neither will allow you to set a property in the 0x8000 to 0xFFFE range. This is contrary to the MAPI documentation, which suggests that providers which support named properties would support them for both message and folder objects.
If you attempt to set a named property on a folder in a PST or cached mode (which is built on top of the PST provider), then you will get MAPI_E_NO_ACCESS in the SPropProblemArray structure returned by SetProps.
If you attempt to set a named property on an Exchange folder, you will get MAPI_E_NO_SUPPORT in the problem array.
Note that the documentation for Named Properties in the MSDN indicates that providers should return MAPI_E_UNEXPECTED_ID if they do not support named properties, so these error codes would appear to be, well, in error. However, I do not believe this is the case since the providers certainly do support named properties. They just don’t support them on certain objects, a case the documentation doesn’t allow for.