'Where do calendar messages in PST files store appointment times and dates?

I am using the PST File Format SDK to try and extract some appointment item data from an Outlook PST export:

int main()
{
    pst myfile(L"export.pst");
    folder calendar = myfile.open_folder(L"Calendar");
    for (folder::message_iterator msg = calendar.message_begin(); msg != calendar.message_end(); ++msg)
    {
        message m = *msg;
        wstring subject = L"";
        if (m.has_subject())
            subject = m.get_subject();
        wstring body = L"";
        if (m.has_body())
            body = m.get_body();
        wstring htmlbody = L"";
        if (m.has_html_body())
            htmlbody = m.get_html_body();
        size_t num_attachments = m.get_attachment_count();
        size_t num_recipients = m.get_recipient_count();
        property_bag bag = m.get_property_bag();
        vector<prop_id> propertyList = bag.get_prop_list();
        for (vector<prop_id>::iterator prop = propertyList.begin(); prop != propertyList.end(); ++prop)
        {
            if (bag.get_prop_type(*prop) == prop_type_systime)
                FILETIME property = bag.read_prop<FILETIME>(*prop);
        }
        break; // Just try the first message for now.
    }
    return 0;
}

How does Outlook store appointment data? I mean, how can I get at the very least the appointment start time and duration (or end time)? I've been trying to scour the PST file format specification from Microsoft but I can't seem to find this information I need!

Edit: I can parse FILETIME objects as in the above code now, but the question is, how can I distinguish them to what time they are referring to? I mean, how can I tell if this is the time of the event date, or the end of the event date, etc.? They should have names to distinguish them, should they not? How do I get that using pstsdk?



Solution 1:[1]

These (and many more) properties are stored as named MAPI properties. Their tags will vary between different stores, so you cannot hardcode them. See the explanation of what named properties are on my web site: https://www.dimastr.com/redemption/utils.htm#named-props

Take a look at an existing appointment in OutlookSpy (I am its author) - click IMessage button.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ryan M