4.2 Finding Free/Busy Messages by Using Email Addresses

The following example shows how the client finds the free/busy message of a user by using the user's email address.

First, the client obtains the user's email address from the PidTagEmailAddress property ([MS-OXOABK] section 2.2.3.14). The client then uses the email address to determine the name of the folder in which the free/busy message exists and to determine the subject of the free/busy message.

For example, a user who has an email address of "o=Adventure-Works/ou=New York/CN= recipients/CN=David" would have his or her free/busy data stored in a free/busy message that has a subject of "USER-/CN=recipients/CN=David" and the free/busy message would be stored in the folder named "EX:/o=Adventure-Works/ou=New York".

The following is an example of the ROPs the client uses to find the free/busy message. David has one event in his calendar that starts on December 25, 2007, at 7:10 P.M. and ends on December 25, 2008, at 7:10 P.M., Pacific Standard Time.

RopLogon ROP Request ([MS-OXCROPS] section 2.2.3.1)

 RopId : 0xFE
 LogonID : 0
 OutputHandleIndex : 0 (HSOT=0xffffffff)
 LogonFlags : 0x04 Replicated
 OpenFlags : 0x00000406 PUBLIC HOME_LOGON NO_MAIL
 StoreState : 0x00000000 <none>
 EssdnSize : 0x00
 ESSDN <no Mailbox>

RopLogon ROP Response

 RopId : 0xFE
 OutputHandleIndex : 0 (HSOT=0x00000017)
 ReturnValue : ecNone (success) (0x00000000)
 LogonFlags : 0x04 Replicated
 Public store 
 FolderArray :
      FolderID 1: 0001-000000000006 Root folder
      FolderID 2: 0001-000000000001 IPM subtree
      FolderID 3: 0001-000000000002 non-IPM subtree
      FolderID 4: 0001-000000000003 Eforms registry
      FolderID 5: 0001-000000000004
      FolderID 6: 0001-000000000005 offline address book
      FolderID 7: 0000-000000000000 Local Eforms registry
      FolderID 8: 0003-000000000007 SCHEDULE+ FREEBUSY
      FolderID 9: 0004-000000000008 Local address book
      FolderID 10: 0000-000000000000 Article index
      FolderID 11: 0000-000000000000 Schedule
      FolderID 12: 0000-000000000000 <not used>
      FolderID 13: 0000-000000000000 <not used>
 ServerGUID : a608eae8-6603-4509-89b3-6dac886dca4d
 PublicFolderPerUserGUID : fbdd61f1-4863-4d07-902a-64d07f4ca88d

The client opens the folder named SCHEDULE+ FREE BUSY, which has an ID of 0001-000000000004 as determined from the RopLogon response.

RopOpenFolder ROP Request ([MS-OXCROPS] section 2.2.4.1)

 RopId : 0x02
 LogonID : 5
 InputHandleIndex : 0 (HSOT=0x0000008c)
 FolderId : 0001-000000000004
 OpenModeFlags : 0x00 ReadOnly

The response to the RopOpenFolder ROP request is omitted for readability and clarity.

To find the subfolder that matches the name that was determined earlier, the client sends the following ROP requests.

RopGetHierarchyTable ROP Request ([MS-OXCROPS] section 2.2.4.13)

 RopId : 0x04
 LogonID : 5
 InputHandleIndex : 0 (HSOT=0x0000008b)
 OutputHandleIndex : 1 (HSOT=0xffffffff)
 TableFlags : 0x00 Standard

The response to the RopGetHierarchyTable ROP request has been omitted for readability and clarity.

RopSetColumns ROP Request ([MS-OXCROPS] section 2.2.5.1)

 RopId : 0x12
 LogonID : 5
 InputHandleIndex : 1 (HSOT=0xffffffff)
 SetColumnsFlag : 0x00 Wait
 PropertyTagCount : 3 (0x03)
 PropertyTags : 0x67480014 PidTagFolderId
 0x3001001F PidTagDisplayName

The response to the RopSetColumns ROP request has been omitted for readability and clarity.

RopFindRow ROP Request ([MS-OXCROPS] section 2.2.5.13)

 RopId : 0x4F
 LogonID : 5
 InputHandleIndex : 1 (HSOT=0xffffffff)
 FindRowFlags : 0x00 Direction: forward
 RestrictionDataSize : 0x0078 (120)
 RestrictionData :
 ConditionType : 0x04 RES_PROPERTY:
 RelationalOperator : 0x04 RELOP_EQ
 0x3001001F PidTagDisplayName EX:/o=Adventure-Works/ou=New York
 Origin: 0x00 BOOKMARK_BEGINNING
 BookmarkSize : 0x0000 (0)
  

RopFindRow ROP Response

 RopId : 0x4F
 InputHandleIndex : 1 (HSOT=0x00000039)
 ReturnValue : ecNone (success) (0x00000000)
 RowNoLongerVisible: 0x00 (FALSE)
 HasRowData: 0x01) (TRUE)
 RowData:
      HasError: 0
      PropertyArray:
      PropCount: 3
      0x67480014 PidTagFolderId 0x0700000000000003
      0x3001001F PidTagDisplayName EX:/o=Adventure-Works/ou=New York
  

Now that the folder has been found, and the FID was retrieved by using the RopFindRow ROP, the client opens the folder.

RopOpenFolder ROP Request

 RopId : 0x02
 LogonID : 5
 InputHandleIndex : 0 (HSOT=0x0000008C)
 FolderId : 0003-000000000007
 OpenModeFlags : 0x00 ReadOnly

The response to the RopOpenFolder ROP request has been omitted for readability and clarity.

RopGetContentsTable ROP Request ([MS-OXCROPS] section 2.2.4.14)

 RopId : 0x05
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000023)
 OutputHandleTable : 1 (HSOT=0xFFFFFFFF)
 TableFlags : 0x00 Standard
  

RopSetColumns ROP Request

 RopId : 0x12
 LogonID : 0
 InputHandleIndex : 1 (HSOT=0xFFFFFFFF)
 SetColumnFlags : 0x00 Wait
 PropertyTagCount : 5 (0x05)
 PropertyTags : 0x67480014 PidTagFolderId
                0x674A0014 PidTagMid
                0x674D0014 PidTagInstID
                0x674E0003 PidTagInstanceNum
                0x0E1D001F PidTagNormalizedSubject

RopSortTable ROP Request ([MS-OXCROPS] section 2.2.5.2)

 RopId : 0x13
 LogonID : 0
 InputHandleIndex : 1 (HSOT=0xFFFFFFFF)
 SortTableFlags : 0x00 Wait
 SortOrderCount : 0x0001 (1)
 CategoryCount : 0x0000 (0)
 ExpandedCount : 0x0000 (0)
 SortOrders :
      PropertyTag : 0x0E1D001F PidTagNormalizedSubject
      0x00 Flag: TABLE_SORT_ASCEND

RopFindRow ROP Request

 RopId : 0x4F
 LogonID : 0
 InputHandleIndex : 1 (HSOT=0xFFFFFFFF)
 FindRowFlags : 0x00 Direction: forward
 RestrictionDataSize : 0x0054 (84)
 RestrictionData :
 ConditionType : 0x04 RES_PROPERTY:
 RelationalOperator : 0x04 RELOP_EQ
 0x0E1D001F PidTagNormalizedSubject USER-/CN=recipients/CN=DAVID
 Origin : 0x00 BOOKMARK_BEGINNING
 BookmarkSize : 0x0000 (0)

RopGetContentsTable ROP Response

 RopId : 0x05
 OutputHandleIndex : 1 (HSOT=0x00000022)
 ReturnValue : ecNone (success) (0x00000000)
 RowCount : 113
  

RopSetColumns ROP Response

 RopId : 0x12
 InputHandleIndex : 1 (HSOT=0x00000022)
 ReturnValue : ecNone (success) (0x00000000)
 TableStatus : TBLSTAT_COMPLETE (0x00)

RopSortTable ROP Response

 RopId : 0x13
 InputHandleIndex : 1 (HSOT=0x00000022)
 ReturnValue : ecNone (success) (0x00000000)
 TableStatus : TBLSTAT_COMPLETE (0x00)
  

RopFindRow ROP Response

 RopId : 0x4F
 InputHandleIndex : 1 (HSOT=0x00000022)
 ReturnValue : NotFound (0x8004010F)

The message is not found, so the client creates it.

RopCreateMessage ROP Request ([MS-OXCROPS] section 2.2.6.2)

 RopId : 0x06
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000023)
 OutputHandleIndex : 1 (HSOT=0xFFFFFFFF)
 CodePageId : 0x0FFF (4095) 
 FolderId : 0003-000000000007
 AssociatedFlag : 0x00

RopCreateMessage ROP Response

 RopId : 0x06
 OutputHandleIndex : 1 (HSOT=0x00000020)
 ReturnValue : ecNone (success) (0x00000000)
 HasMessageId : 0

Now the client sets the properties.

RopSetProperties ROP Request ([MS-OXCROPS] section 2.2.8.6)

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x000F (15)
 PropertyValueCount : 2 (0x02)
 PropertyValues : 0x68410003 PidTagScheduleInfoResourceType 
                  0x00000000 (0) 0x6846000B PidTagGatewayNeedsToRefresh 0x0001 (TRUE)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x0156 (342)
 PropertyValueCount : 7 (0x07)
 PropertyValues : 0x68410003 PidTagScheduleInfoResourceType
                  0x6842000B PidTagScheduleInfoDelegatorWantsCopy 0x0001 (TRUE)
                  0x6843000B PidTagScheduleInfoDontMailDelegates 0x0001 (TRUE)
                  0x686D000B PidTagScheduleInfoAutoAcceptAppointments 0x0000 (FALSE)
                  0x686E000B PidTagScheduleInfoDisallowRecurringAppts 0x0000 (FALSE)
                  0x686F000B PidTagScheduleInfoDisallowOverlappingAppts 0x0000 (FALSE)
                  0x684B000B PidTagScheduleInfoDelegatorWantsInfo 0x0001 (TRUE)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x0056 (86)
 PropertyValueCount : 2 (0x02)
 PropertyValues : 0x003D001F PidTagSubjectPrefix (null)
                  0x0E1D001F PidTagNormalizedSubject USER-/CN=recipients/CN=DAVID
  

RopSaveChangesMessage ROP Request ([MS-OXCROPS] section 2.2.6.3)

 RopId : 0x0C
 LogonID : 0
 ResponseHandleIndex : 1 (HSOT=0x00000023)
 InputHandleIndex : 0 (HSOT=0x00000020)
 SaveFlags : 0x0A KeepOpenReadWrite DelayedCall

RopSaveChangesMessage ROP Response

 RopId : 0x0C
 ResponseHandleIndex : 1 (HSOT=0x00000023)
 ReturnValue : ecNone (success) (0x00000000)
 InputHandleIndex : 0 (HSOT=0x00000020)
 MessageID : 0001-0000000051E3

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 2 (HSOT=0x00000020)
 PropertyValueSize : 0x00AC (172)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x6849001F PidTagFreeBusyMessageEmailAddress /o=Adventure-Works/ou=New York/CN=recipients/CN=David

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x0026 (38)
 PropertyValueCount : 2 (0x02)
 PropertyValues : 0x684F1003 PidTagScheduleInfoMonthsMerged
                       PtypMultipleInteger32 [0]: 32130
                       PtypMultipleInteger32 [1]: 32131
                  0x68501102 PidTagScheduleInfoFreeBusyMerged
                       PtypMultipleBinary [0] (4 bytes): 0000: E0 01 20 A3
                       PtypMultipleBinary [1] (4 bytes): 0000: 00 00 E0 01

RopDeletePropertiesNoReplicate ROP Request ([MS-OXCROPS] section 2.2.8.9)

 RopId : 0x7A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyTagCount : 2 (0x02)
 PropertyTags : 0x68511003 PidTagScheduleInfoMonthsTentative
                0x68521102 PidTagScheduleInfoFreeBusyTentative

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x0026 (38)
 PropertyValueCount : 2 (0x02)
 PropertyValues : 0x68531003 PidTagScheduleInfoMonthsBusy
                       PtypMultipleInteger32 [0]: 32130
                       PtypMultipleInteger32 [1]: 32131
                  0x68541102 PidTagScheduleInfoFreeBusyBusy
                       PtypMultipleBinary [0] (4 bytes):0000: E0 01 20 A3
                       PtypMultipleBinary [1] (4 bytes):0000: 00 00 E0 01

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x0007 (7)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x6846000B PidTagGatewayNeedsToRefresh 0x0001 (TRUE)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x000A (10)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x68470003 PidTagFreeBusyPublishStart PtypInteger32 0x0CC2FD60 (214105440)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x000A (10)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x68480003 PidTagFreeBusyPublishEnd 0x0CC3A080 (214147200)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x000E (14)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x68680040 PidTagFreeBusyRangeTimestamp
 High: 0x01C87A68
 Low: 0x430A6000 (2008/02/29 00:16:00.000)

RopSetProperties ROP Request

 RopId : 0x0A
 LogonID : 0
 InputHandleIndex : 0 (HSOT=0x00000020)
 PropertyValueSize : 0x000A (10)
 PropertyValueCount : 1 (0x01)
 PropertyValues : 0x68410003 PidTagScheduleInfoResourceType 0x00000000 (0)

RopSaveChangesMessage ROP Request

 RopId : 0x0C
 LogonID : 0
 ResponseHandleIndex : 1 (HSOT=0x00000023)
 InputHandleIndex : 0 (HSOT=0x00000020)
 SaveFlags : 0x08 DelayedCall

RopSaveChangesMessage ROP Response

 RopId : 0x0C
 ResponseHandleIndex : 1 (HSOT=0x00000023)
 ReturnValue : ecNone (success) (0x00000000)
 InputHandleIndex : 0 (HSOT=0x00000020)
 MessageID : 0001-0000000051e3

The client then calls the RopRelease ROP ([MS-OXCROPS] section 2.2.15.3) on all open folders and the newly created message.

Show: