4.2.2.7 Accepting the Exception

After receiving the Meeting Update object, Mr. Dennis Saylor indicates that the change will still work with his schedule. The Calendar object in Mr. Saylor's Calendar folder needs to be updated, and a Meeting Response object needs to be sent back to Mr. John.

To accomplish this task, the client uses the RopOpenMessage ROP ([MS-OXCROPS] section 2.2.6.1) to open the Meeting Update object to which the server returns a success code and a handle. The client uses the RopGetPropertiesSpecific ROP ([MS-OXCROPS] section 2.2.8.3) to get at least the following properties: PidTagOwnerAppointmentId (section 2.2.1.29), PidLidGlobalObjectId (section 2.2.1.27), and PidLidCleanGlobalObjectId (section 2.2.1.28).

The client uses the RopGetContentsTable ROP ([MS-OXCROPS] section 2.2.4.14) to open the contents table of the Calendar special folder. The server returns a handle to the contents table. The client sets at least the following column set on the contents table by using the RopSetColumns ROP ([MS-OXCROPS] section 2.2.5.1):

The Meeting Update object in this example has a value for the PidTagOwnerAppointmentId property, so the client uses the RopSortTable ROP ([MS-OXCROPS] section 2.2.5.2) to sort the contents table in ascending order of this property. The client then uses the RopFindRow ROP ([MS-OXCROPS] section 2.2.5.13) to find the first matching table row. The server returns a success code with the first matching row or returns an error code if a matching row was not found.

For each matching row, the client compares the value of the PidLidCleanGlobalObjectId property from the Meeting Update object with the value of the PidLidGlobalObjectId property in the row, until a match is found. (If a match had not been found, a client would search for an orphan instance by trying to match the value of the PidLidGlobalObjectId (section 2.2.1.27) property from the Meeting Update object (because this Meeting Update object represents an exception). If an orphan instance is not found, a client would search for a matching row with the value of 0 (zero) for the PidTagOwnerAppointmentId property. If a matching recurring series or orphan exception still could not be found, then it would be assumed that the Meeting object does not exist in the folder and the Meeting Update object would be treated as a Meeting Request object.) After finding a matching row, the client issues the RopOpenMessage ROP by using the value of the PidTagMid property from that row to open the Meeting object, to which the server returns a success code and a handle.

Having obtained the recurring series, the client tries to find the Exception Attachment object. The client uses the RopGetAttachmentTable ROP ([MS-OXCROPS] section 2.2.6.17) to open the list of attachments. The client uses RopSetColumns to set at least the following columns on this table:

The client uses RopQueryRows ([MS-OXCROPS] section 2.2.5.4) to loop through the rows in the attachments table, attempting to find the matching Exception Attachment object. If the value of the PidTagAttachmentFlags property in a row does not include the afException flag, the attachment does not represent an exception. To find the matching Exception Attachment object, the client uses the values of the Day, Month, and Year fields of the PidLidGlobalObjectId property on the Meeting Update object to compute the replace date and time and looks for an Exception Attachment object with a matching value. Note that if the Exception Attachment object has the PidTagExceptionReplaceTime property (section 2.2.10.1.6), the value of this property is compared with the computed replace time to determine whether the attachment is the matching exception. If the attachment does not have this property, the client needs to use the RopOpenAttachment ROP ([MS-OXCROPS] section 2.2.6.12), RopOpenEmbeddedMessage ([MS-OXCROPS] section 2.2.6.16), and RopGetPropertiesSpecific ([MS-OXCROPS] section 2.2.8.3) ROPs to get the PidLidExceptionReplaceTime property from the Exception Embedded Message object and match that value against the computed replace time.

In this example, an Exception Attachment object does not exist, so the client uses the RopCreateAttachment ROP ([MS-OXCROPS] section 2.2.6.13) to create a new one, to which the server returns a success code and a handle. The client uses the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) to set the property in the following table on the Attachment object.

Property

Property ID

Property type

Value

PidTagAttachMethod

0x3705

0x0003 (PtypInteger32 ([MS-OXCDATA] section 2.11.1)

0x00000005 (ATTACH_EMBEDDED_MSG)

After setting the attachment method, the client uses the RopOpenEmbeddedMessage ROP ([MS-OXCROPS] section 2.2.6.16) with the OpenModeFlag field set to TRUE to request a new Embedded Message object from the Attachment object. The server returns a success code and a handle to the new Embedded Message object. The client then uses the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) to set the properties listed in the following table on the Exception Embedded Message object, as specified in section 2.2.10.2, as copied from the Meeting Request object:

Property

Property ID

Property type

Value

PidTagMessageClass ([MS-OXCMSG] section 2.2.1.3)

0x001A

0x001F (PtypString ([MS-OXCDATA] section 2.11.1.2))

IPM.OLE.class.{00061055-0000-0000-C000-000000000046}

PidTagSubjectPrefix ([MS-OXCMSG] section 2.2.1.9)

0x003D

0x001F (PtypString)

PidTagNormalizedSubject ([MS-OXCMSG] section 2.2.1.10)

0x0E1D

0x001F (PtypString)

Weekly meeting

PidLidBusyStatus (section 2.2.1.2)

0x81B6

0x0003 (PtypInteger32)

0x00000001 (olTentative)

PidLidIntendedBusyStatus (section 2.2.6.4)

0x81E2

0x0003 (PtypInteger32)

0x00000002 (olBusy)

PidLidLocation (section 2.2.1.4)

0x8009

0x001F (PtypString)

Your Office

PidLidRecurring (section 2.2.1.12)

0x81FD

0x000B (PtypBoolean ([MS-OXCDATA] section 2.11.1))

0x01 (TRUE)

PidLidAppointmentStartWhole (section 2.2.1.5)

0x81B2

0x0040 (PtypTime ([MS-OXCDATA] section 2.11.1))

0x01C88F6704809C00 (2008/03/26 17:30:00.000)

PidLidAppointmentEndWhole (section 2.2.1.6)

0x81AC

0x0040 (PtypTime)

0x01C88F6B3562D000 (2008/03/26 18:00:00.000)

PidLidTimeZoneStruct (section 2.2.1.39)

0x8214

0x0102 (PtypBinary ([MS-OXCDATA] section 2.11.1))

See the paragraph marked *1 that follows this table.

PidLidAppointmentTimeZoneDefinitionStartDisplay (section 2.2.1.42)

0x83A8

0x0102 (PtypBinary)

See the paragraph marked *2 that follows this table.

PidLidAppointmentTimeZoneDefinitionEndDisplay (section 2.2.1.43)

0x83A9

0x0102 (PtypBinary)

See the paragraph marked *2 that follows this table.

PidLidAppointmentTimeZoneDefinitionRecur (section 2.2.1.41)

0x83AA

0x0102 (PtypBinary)

See the paragraph marked *3 that follows this table.

PidLidAppointmentDuration (section 2.2.1.7)

0x81A9

0x0003 (PtypInteger32)

0x0000001E (30)

PidLidAppointmentAuxiliaryFlags (section 2.2.1.3)

0x82D2

0x0003 (PtypInteger32)

0x00000000 (0)

PidLidAppointmentSubType (section 2.2.1.9)

0x8120

0x000B (PtypBoolean)

0x00 (FALSE)

PidLidAppointmentStateFlags (section 2.2.1.10)

0x81B3

0x0003 (PtypInteger32)

0x00000003 (3)

PidLidResponseStatus (section 2.2.1.11)

0x8122

0x0003 (PtypInteger32)

respNotResponded (0x00000005)

PidLidAppointmentNotAllowPropose (section 2.2.1.26

0x82D5

0x000B (PtypBoolean)

0x00 (FALSE)

PidLidExceptionReplaceTime (section 2.2.10.2.5)

0x83AC

0x0040 (PtypTime)

0x01C88E9DDA16DC00 (2008/03/25 17:30:00.000)

PidLidFInvited (section 2.2.4.4)

0x81DA

0x000B (PtypBoolean)

0x01 (TRUE)

PidLidFExceptionalAttendees (section 2.2.2.3)

0x82D7

0x000B (PtypBoolean)

0x00 (FALSE)

PidLidFExceptionalBody (section 2.2.10.2.6)

0x82D8

0x000B (PtypBoolean)

0x01 (TRUE)

PidLidRecurrenceType (section 2.2.1.45)

0x81FE

0x0003 (PtypInteger32)

0x00000002 (2)

PidLidRecurrencePattern (section 2.2.1.46)

0x81FC

0x001F (PtypString)

Every Tuesday from 10:30 A.M. to 11:00 A.M.

PidLidTimeZoneDescription (section 2.2.1.40)

0x8213

0x001F (PtypString)

(GMT - 08:00) Pacific Time (U.S. & Canada)

PidLidClipStart (section 2.2.1.14)

0x81BA

0x0040 (PtypTime)

0x01C88F6704809C00 (2008/03/26 17:30:00.000)

PidLidClipEnd (section 2.2.1.15)

0x81B9

0x0040 (PtypTime)

0x01C88F6B3562D000 (2008/03/26 18:00:00.000)

PidLidAllAttendeesString (section 2.2.1.16)

0x81A8

0x001F (PtypString)

desaylor

PidLidToAttendeesString (section 2.2.1.17)

0x82D9

0x001F (PtypString)

desaylor

PidLidAppointmentSequence (section 2.2.1.1)

0x81AF

0x0003 (PtypInteger32)

0x00000000 (0)

PidLidAppointmentSequenceTime (section 2.2.4.1)

0x82E7

0x0040 (PtypTime)

0x01C874276FF4F450 (2008/02/21 01:16:51.093)

PidLidChangeHighlight (section 2.2.6.2)

0x82EC

0x0003 (PtypInteger32)

0x00000083 (131)

PidLidReminderTime ([MS-OXORMDR] section 2.2.1.4)

0x8005

0x0040 (PtypTime)

0x01C88F6704809C00 (2008/03/26 17:30:00.000)

PidLidCommonStart ([MS-OXCMSG] section 2.2.1.18)

0x81BC

0x0040 (PtypTime)

0x01C88F6704809C00 (2008/03/26 17:30:00.000)

PidLidCommonEnd ([MS-OXCMSG] section 2.2.1.19)

0x81BB

0x0040 (PtypTime)

0x01C88F6B3562D000 (2008/03/26 18:00:00.000)

PidLidAttendeeCriticalChange (section 2.2.5.2)

0x81B5

0x0040 (PtypTime)

0x01C8742891F14080 (2008/02/21 01:24:57.608)

PidLidWhere (section 2.2.5.3)

0x8219

0x001F (PtypString)

Your Office

PidLidGlobalObjectId

0x81E0

0x0102 (PtypBinary)

See the paragraph marked *4

PidLidCleanGlobalObjectId

0x81B8

0x0102 (PtypBinary)

See the paragraph marked *5

PidLidAppointmentMessageClass (section 2.2.6.6)

0x8311

0x001F (PtypString)

IPM.appointment

PidLidIsRecurring (section 2.2.1.13)

0x81E5

0x000B (PtypBoolean)

0x01 (TRUE)

PidLidIsException (section 2.2.1.35)

0x81E4

0x000B (PtypBoolean)

0x01 (TRUE)

PidLidTimeZone (section 2.2.5.6)

0x8212

0x0003 (PtypInteger32)

0x0000000D (13)

PidLidCalendarType (section 2.2.6.11)

0x81B7

0x0003 (PtypInteger32)

0x00000001 (CAL_GREGORIAN)

PidLidOwnerCriticalChange (section 2.2.1.34)

0x8128

0x0040 (PtypTime)

0x01C874289289D700 (2008/02/21 01:24:58.608)

PidLidMeetingType (section 2.2.6.5)

0x8314

0x0003 (PtypInteger32)

0x00010000 (65536)

PidLidOldLocation (section 2.2.6.7)

0x8316

0x001F (PtypString)

(null)

PidLidOldWhenStartWhole (section 2.2.6.8)

0x83CC

0x0040 (PtypTime)

0x01C88E9DDA16DC00 (2008/03/25 17:30:00.000)

PidLidOldWhenEndWhole (section 2.2.6.9)

0x83CD

0x0040 (PtypTime)

0x01C88EA20AF91000 (2008/03/25 18:00:00.000)

PidTagResponseRequested ([MS-OXOMSG] section 2.2.1.46)

0x0063

0x000B (PtypBoolean)

0x01 (TRUE)

PidTagStartDate (section 2.2.1.30)

0x0060

0x0040 (PtypTime)

0x01C88F6704809C00 (2008/03/26 17:30:00.000)

PidTagEndDate (section 2.2.1.31)

0x0061

0x0040 (PtypTime)

0x01C88F6B3562D000 (2008/03/26 18:00:00.000)

PidTagOwnerAppointmentId

0x0062

0x0003 (PtypInteger32)

0x4D9427D8

Best body properties

The client can look for and remove the downlevel text, as specified in section 2.2.6.12, before copying the text stream onto the new Exception Embedded Message object.

*1 For a description of the PidLidTimeZoneStruct property BLOB see section 4.1.5. The value for this Meeting Request object is as follows.

 cb: 48
  
 lpb:
 E001000000000000C4FFFFFF000000000B00000001000200000000000000000000000300000002000200000000000000

*2 The dates in the value of the PidLidAppointmentTimeZoneDefinitionRecur property for this appointment are both set in the same time zone. For a description of the time zone definition property BLOB, see section 4.1.4. The only difference between this BLOB and that in the PidLidAppointmentTimeZoneDefinitionStartDisplay and PidLidAppointmentTimeZoneDefinitionEndDisplay properties is that the TZRULE_FLAG_RECUR_CURRENT_TZREG flag is set in this BLOB. The value for this Meeting Request object is as follows.

  
 cb: 184
  
 lpb:
 0201300002001500500061006300690066006900630020005300740061006E0064006100720064002000540069006D006500020002013E000000D6070000000000000000000000000000E001000000000000C4FFFFFF00000A000000050002000000000000000000040000000100020000000000000002013E000300D7070000000000000000000000000000E001000000000000C4FFFFFF00000B0000000100020000000000000000000300000002000200000000000000

*3 The start and end dates for this appointment are both set in the same time zone. The value for this Meeting Request object is as follows.

  
 cb: 184
 lpb:
 0201300002001500500061006300690066006900630020005300740061006E0064006100720064002000540069006D006500020002013E000000D6070000000000000000000000000000E001000000000000C4FFFFFF00000A000000050002000000000000000000040000000100020000000000000002013E000200D7070000000000000000000000000000E001000000000000C4FFFFFF00000B0000000100020000000000000000000300000002000200000000000000

*4 The value of the PidLidGlobalObjectId property for this Meeting Request object is as follows. For a description of the Global Object ID BLOB see section 4.1.2.

  
 cb: 56
 lpb: 040000008200E00074C5B7101A82E00807D803195025D461E473C8010000000000000000100000002A5844B3A444F74A9C246C60886F116B

*5 The value of the PidLidCleanGlobalObjectId property for this Meeting Request object is as follows. This value is identical to the value of the PidLidGlobalObjectId property except that the Year, Month, and Day fields are filled with zeros.

  
 cb: 56
 lpb: 040000008200E00074C5B7101A82E008000000005025D461E473C8010000000000000000100000002A5844B3A444F74A9C246C60886F116B

The client uses the RopModifyRecipients ROP ([MS-OXCROPS] section 2.2.6.5) to set the recipients (2) on the Exception Embedded Message object. The recipients (2) are obtained from the RecipientRow structures, as described in [MS-OXCDATA] section 2.8.3, of the Meeting Request object, as well as the PidLidAppointmentUnsendableRecipients property (section 2.2.1.25). In addition, if the organizer (in this case, Mr. John) is not in the list of recipients (1), his information is obtained from the PidTagSentRepresentingSearchKey ([MS-OXOMSG] section 2.2.1.58) and PidTagSentRepresentingName ([MS-OXOMSG] section 2.2.1.57) properties and added as a RecipientRow structure. The Exception Embedded Message object is saved by using the RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3), to which the server returns a success code.

After saving the Exception Embedded Message object, the client uses the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) to set the properties listed in the following table on the Exception Attachment object (not the Exception Embedded Message object).

Property

Property ID

Property type

Value

PidTagExceptionStartTime (section 2.2.10.1.4)

0x7FFB

0x0040 (PtypTime)

0x01C88F2C5821C400 (2008/03/26 10:30:00.000)

PidTagExceptionEndTime (section 2.2.10.1.5)

0x7FFC

0x0040 (PtypTime)

0x01C88F308903F800 (2008/03/26 11:00:00.000)

PidTagExceptionReplaceTime

0x7FF9

0x0040 (PtypTime)

0x01C88E9DDA16DC00 (2008/03/25 17:30:00.000)

PidTagAttachmentFlags

0x7FFD

0x0003 (PtypInteger32)

0x00000002 (afException)

PidTagAttachmentHidden ([MS-OXCMSG] section 2.2.2.24)

0x7FFE

0x000B (PtypBoolean)

0x01 (TRUE)

The client uses the RopSaveChangesAttachment ROP ([MS-OXCROPS] section 2.2.6.15) to save the changes to the Attachment object.

Now that the exception has been created, the client makes the following change to the Meeting object (the object that represents the recurring series) on Mr. Saylor's calendar by using the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6).

Property

Property ID

Property type

Value

PidLidAppointmentRecur (section 2.2.1.44)

0x81AD

0x0102 (PtypBinary)

See the paragraph marked *1 that follows this table.

*1 The value of the PidLidAppointmentRecur property will include necessary information about this new exception. The new value for the attendee's Meeting object is as follows.

  
 cb: 114
  
 lpb:
 043004300B2001000000C0210000010000000000000004000000232000000A0000000000000001000000A025C40C01000000402BC40C2088C30CDF80E95A063000000930000076020000940200000100B62DC40CD42DC40C1628C40C00020000000004000000000000000000000000000000

The client sets the following property on the Meeting Request object by using the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6), followed by the RopSaveChangesMessage ROP.

Property

Property ID

Property type

Value

PidTagProcessed (section 2.2.5.7)

0x7D01

0x000B (PtypBoolean)

0x01 (TRUE)

After processing the Meeting Request object, the client is now ready to act on the response. To start, the changes listed in the following table are made to the Exception Embedded Message object by using the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6).

Property

Property ID

Property type

Value

PidLidBusyStatus

0x81B6

0x0003 (PtypInteger32)

0x00000002 (2)

PidLidResponseStatus

0x8122

0x0003 (PtypInteger32)

respAccepted (0x00000003)

PidLidAppointmentReplyTime (section 2.2.4.3)

0x8139

0x0040 (PtypTime)

0x01C87428FEA81000 (2008/02/21 01:28:00.000)

PidLidAppointmentReplyName (section 2.2.4.5)

0x81AE

0x001F (PtypString)

desaylor

The client again saves the Exception Embedded Message object by using the RopSaveChangesMessage ROP and another RopSaveChangesMessage ROP to save the Meeting object that represents the recurring series, to which the server returns success codes.

The last thing the client needs to do is send a response to the organizer. The client creates a new Meeting Response object in the Outbox folder by using the RopCreateMessage ROP ([MS-OXCROPS] section 2.2.6.2), to which the server returns a success code and a handle. The client sets the following properties on this new Message object by using the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) using the values from the Exception Embedded Message object:

  • PidTagNormalizedSubject

  • PidLidBusyStatus

  • PidLidAppointmentColor ([MS-OXPROPS] section 2.9)

  • PidLidLocation

  • PidLidRecurring (section 2.2.1.12)

  • PidLidAppointmentStartWhole

  • PidLidAppointmentEndWhole

  • PidLidAppointmentTimeZoneDefinitionStartDisplay

  • PidLidAppointmentTimeZoneDefinitionEndDisplay

  • PidLidAppointmentDuration

  • PidLidAppointmentAuxiliaryFlags

  • PidLidAppointmentSubType

  • PidLidAppointmentRecur

  • PidLidRecurrenceType

  • PidLidRecurrencePattern

  • PidLidTimeZoneStruct

  • PidLidAppointmentTimeZoneDefinitionRecur

  • PidLidTimeZoneDescription

  • PidLidClipStart

  • PidLidClipEnd

  • PidLidAppointmentSequence

  • PidLidCommonStart

  • PidLidCommonEnd

  • PidLidWhere

  • PidLidGlobalObjectId

  • PidLidCleanGlobalObjectId

  • PidLidAppointmentMessageClass

  • PidLidIsRecurring (section 2.2.1.13)

  • PidLidIsException

  • PidLidTimeZone

  • PidLidCalendarType

  • PidLidOwnerCriticalChange

  • PidTagStartDate (section 2.2.1.30)

  • PidTagEndDate (section 2.2.1.31)

  • PidTagOwnerAppointmentId (section 2.2.1.29)

In addition to these, the client uses the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) to put the property values listed in the following table onto the Meeting Response object.

Property

Property ID

Property type

Value

PidTagMessageClass

0x001A

0x001F (PtypString)

IPM.Schedule.Meeting.Resp.Pos

PidTagSubjectPrefix

0x003D

0x001F (PtypString)

Accepted:

PidLidSideEffects ([MS-OXCMSG] section 2.2.1.16)

0x8002

0x0003 (PtypInteger32)

0x00001C61 (7265)

PidLidAttendeeCriticalChange

0x81B5

0x0040 (PtypTime)

0x01C874292153F290 (2008/02/21 01:28:58.169)

PidLidIsSilent (section 2.2.7.7)

0x81E6

0x000B (PtypBoolean)

0x01 (TRUE)

The client adds the organizer by using the RopModifyRecipients ROP ([MS-OXCROPS] section 2.2.6.5) and then sends the object via the RopSubmitMessage ROP ([MS-OXCROPS] section 2.2.7.1). After the server returns a success code from submission, the client releases all objects, including the Embedded Message objects, Attachment objects, attachments table, Meeting objects, and Meeting Request objects, by using the RopRelease ROP ([MS-OXCROPS] section 2.2.15.3) for each.