This project is read-only.

Reading PR_CONTAINER_CLASS from folder

Aug 4, 2011 at 11:11 PM

Hi, I'm just getting back to this project after a break, and have another
question (and thank you ChazzImage for your suggestion).

I'm a little unclear about get_property_bag() - will this give me access to
any property of an object?  I ask because I am trying to retrieve PR_CONTAINER_CLASS
from a folder:

wstring container, fname;
pstsdk::property_bag bag=folder.get_property_bag();

    fname = folder.get_name();
    container = bag.read_prop<wstring>(0x3613);

In this example, the call to folder.get_name works fine, so I presume the folder
object is intact.  Then the call to read property x3613 causes a runtime error.
If I change the value to x3001 (PR_DISPLAY_NAME) it works fine.  So it looks like
pstsdk thinks that x3613 does not exist.  But it does exist, when I check the
.pst file using Outlook Spy.  What's going on?

Aug 4, 2011 at 11:19 PM

Never mind - to answer my own question, PR_CONTAINER_CLASS does in fact not exist in some folders,

such as the message store name.

Aug 5, 2011 at 12:37 AM

I guess I do need to re-ask my original question - does the property_bag contain every possible property?  Now

I am looking to get, for example, property 0x3601 (PR_FOLDER_TYPE) from my folder object.  pstsdk tells me

that it does not exist for any folder, even though I see it with Outlook Spy.  When I iterate all the possible properties,

I do not get very many.  I do have PR_DISPLAY_NAME and PR_CONTAINER_CLASS (for some), and also 0x3602 and

0x3603 (PR_CONTENT_COUNT and PR_CONTENT_UNREAD).   But where are the remaining properties?