4.3 Converting a GlobalObjId to a UID
The following examples demonstrate how to convert a GlobalObjId value to a UID value. For more information about the process used for this conversion, see section 3.1.4.7.
Example 1
Given the following GlobalObjId value:
GlobalObjID=BAAAAIIA4AB0xbcQGoLgCAfUCRDgQMnBJoXEAQAAAAAAAAAAEAAAAAvw7UtuTulOnjnjhns3jvM=
Decoded from base64 encoding, the GlobalObjID is equal to:
Bytes 1-16: <04><00><00><00><82><00><E0><00><74><C5><B7><10><1A><82><E0><08> Bytes 17-20: <07><D4><09><10> Bytes 21-36: <E0><40><C9><C1><26><85><C4><01><00><00><00><00><00><00><00><00> Bytes 37-40: <10><00><00><00> Bytes 41-56: <0B><F0><ED><4B><6E><4E><E9><4E><9E><39><E3><86><7B><37><8E><F3>
Because bytes 41-48 do not equal "vCal-Uid", this GlobalObjId is an OutlookID. Bytes 17-20 are converted to zeros and the entire value is hex encoded, resulting in the following UID value:
UID=040000008200E00074C5B7101A82E00800000000E040C9C12685C4010000000000000000100000000BF0ED4B6E4EE94E9E39E3867B378EF3
Example 2
Given the following GlobalObjId value:
GlobalObjID=BAAAAIIA4AB0xbcQGoLgCAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAAHZDYWwtVWlkAQAAAHs4MTQxMkQzQy0yQTI0LTRFOUQtQjIwRS0xMUY3QkJFOTI3OTl9AA==
Decoded from base64 encoding, the GlobalObjID is equal to:
Bytes 1-16: <04><00><00><00><82><00><E0><00><74><C5><B7><10><1A><82><E0><08> Bytes 17-20: <00><00><00><00> Bytes 21-36: <00><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00> Bytes 37-40: <33><00><00><00> Bytes 41-52: vCal-Uid<01><00><00><00> Bytes 53-91: {81412D3C-2A24-4E9D-B20E-11F7BBE92799}<00>
Bytes 37-40 indicate the length of the data to follow is 51 bytes. 51 – 13 = 38 bytes for the length of the UID.
The 38 bytes beginning at byte 53 result in the UID value:
UID={81412D3C-2A24-4E9D-B20E-11F7BBE92799}