I have an application that fetches calendar entries from users calendars and parses the items to an internal format. After logging in as a user, the application uses FindMessages (...) in the users calendar folder to search for items. I specify the query for FindMessages as

(MODIFY_DATE >= 2010/9/20)

to only get items that have been modified after a certain date. This works fine.

The application then gets subject, startdate, enddate and other fields for each item, using properties on the item:

DIGWMessageListPtr gwMessages = gwCalendarFolder->FindMessages ( query );
for ( int i = 0; i < gwMessages->Count; i++ )
CComQIPtr< IGWAppointment > gwMessage = gwMessages->Item ( i );
string startDate = gwMessage->StartDate;
string subject = gwMessage->Subject->PlainText;

However, I want to get the exact modified time of each item, how do I do that? There is no property defined for that, e.g. no nice gwMessage->ModifiedDate to call.

I also tried getting the modified time using the fields collection, but an exception is throw when I try it, meaning there is no such field:

DIGWFieldPtr gwField = gwMessage->Fields->Item( _variant_t("MODIFY_DATE"), _variant_t(egwDate);

I also had the idea to loop over the Fields collection to see what actual fields there are, in case the field has some other name, but the gwMessages->Fields->Count always returns 0...

Any ideas?

- Nonis