Skip to content

Commit

Permalink
Show more information for typical Contact properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Dijji committed Sep 16, 2018
1 parent 9114ded commit 31a55c1
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 5 deletions.
35 changes: 34 additions & 1 deletion LTP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,41 @@ private dynamic ReadPropertyValue(FileStream fs, BTree<Node> subNodeTree, List<H
len = buf.Length - (int)offsets[i];

ss[i] = Encoding.Unicode.GetString(buf, (int)offsets[i], len);
}
val = ss;
}
val = ss;
}
break;

case EpropertyType.PtypMultipleBinary:
if (!prop.dwValueHnid.HasValue)
val = null;
else
{
buf = GetBytesForHNID(fs, blocks, subNodeTree, prop.dwValueHnid);

if (buf == null)
val = "<Could not read MultipleBinary value>";
else
{
var count = Map.MapType<UInt32>(buf);
var offsets = Map.MapArray<UInt32>(buf, sizeof(UInt32), (int)count);
var bs = new List<byte[]>();

// Offsets are relative to the start of the buffer
for (int i = 0; i < count; i++)
{
int len;
if (i < count - 1)
len = (int)(offsets[i + 1] - offsets[i]);
else
len = buf.Length - (int)offsets[i];

var b = new byte[len];
Array.Copy(buf, offsets[i], b, 0, len);
bs.Add(b);
}
val = bs;
}
}
break;
Expand Down
19 changes: 15 additions & 4 deletions NamedProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private class PropSet
{0x000085a0, "ToDoOrdinalDate" },
{0x000085a1, "ToDoSubOrdinal" },
{0x000085a4, "ToDoTitle" },
{0x000085d8, "undocumented" },
{0x000085d8, "undocumented (85d8)" },
}
}
},
Expand All @@ -77,13 +77,16 @@ private class PropSet
{
{0x00008005, "FileUnder" },
{0x00008006, "FileUnderId" },
{0x0000800e, "undocumented" },
{0x0000800e, "undocumented (800e)" },
{0x00008010, "Department" },
{0x00008015, "HasPicture" },
{0x0000801a, "HomeAddress" },
{0x0000801b, "WorkAddress" },
{0x0000801c, "OtherAddress" },
{0x00008023, "ContactCharacterSet" },
{0x00008025, "AutoLog" },
{0x00008026, "FileUnderList" },
{0x00008027, "undocumented" },
{0x00008027, "undocumented (8027)" },
{0x00008028, "AddressBookProviderEmailList" },
{0x00008029, "AddressBookProviderArrayType" },
{0x00008045, "WorkAddressStreet" },
Expand All @@ -92,8 +95,12 @@ private class PropSet
{0x00008048, "WorkAddressPostalCode" },
{0x00008049, "WorkAddressCountry" },
{0x0000804a, "WorkAddressPostOfficeBox" },
{0x0000804c, "DistributionListChecksum" },
{0x00008053, "DistributionListName" },
{0x00008054, "DistributionListOneOffMembers" },
{0x00008055, "DistributionListMembers" },
{0x00008062, "InstantMessagingAddress" },
{0x00008063, "undocumented" },
{0x00008063, "undocumented (8063)" },
{0x00008080, "Email1DisplayName" },
{0x00008082, "Email1AddressType" },
{0x00008083, "Email1EmailAddress" },
Expand All @@ -115,10 +122,14 @@ private class PropSet
{0x000080c2, "Fax2AddressType" },
{0x000080c3, "Fax2EmailAddress" },
{0x000080c4, "Fax2OriginalDisplayName" },
{0x000080c5, "Fax2OriginalEntryId" },
{0x000080d2, "Fax3AddressType" },
{0x000080d3, "Fax3EmailAddress" },
{0x000080d4, "Fax3OriginalDisplayName" },
{0x000080dd, "AddressCountryCode" },
{0x000080e0, "IsContactLinked" },
{0x000080e6, "ContactLinkGlobalAddressListLinkState" },
{0x000080eb, "undocumented (80eb)" },
}
}
},
Expand Down
1 change: 1 addition & 0 deletions Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public enum EpropertyType : UInt16
PtypString = 0x001f,
PtypString8 = 0x001e,
PtypMultipleString = 0x101F,
PtypMultipleBinary = 0x1102,
PtypTime = 0x0040,
}

Expand Down
22 changes: 22 additions & 0 deletions StandardProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class StandardProperties
{EpropertyTag.PidTagSubjectW, "Subject" },
{EpropertyTag.PidTagClientSubmitTime, "ClientSubmitTime" },
{(EpropertyTag)0x003b, "SentRepresentingSearchKey" },
{(EpropertyTag)0x003d, "SubjectPrefix" },
{(EpropertyTag)0x003f, "ReceivedByEntryId" },
{(EpropertyTag)0x0040, "ReceivedByName" },
{(EpropertyTag)0x0041, "SentRepresentingEntryId" },
Expand Down Expand Up @@ -87,8 +88,12 @@ class StandardProperties
{(EpropertyTag)0x0e08, "MessageSize" },
{(EpropertyTag)0x0e0a, "SentMailEntryId" },
{(EpropertyTag)0x0e0f, "Responsibility" },
{(EpropertyTag)0x0e17, "MessageStatus" },
{(EpropertyTag)0x0e1d, "NormalizedSubject" },
{(EpropertyTag)0x0e1f, "RtfInSync" },
{EpropertyTag.PidTagAttachmentSize, "AttachSize" },
{(EpropertyTag)0x0e23, "InternetArticleNumber" },
{(EpropertyTag)0x0e27, "undocumented" },
{(EpropertyTag)0x0e28, "PrimarySendAccount" },
{(EpropertyTag)0x0e29, "NextSendAcct" },
{(EpropertyTag)0x0e2b, "ToDoItemFlags" },
Expand All @@ -101,11 +106,14 @@ class StandardProperties
{(EpropertyTag)0x0e55, "undocumented" },
{(EpropertyTag)0x0e58, "undocumented" },
{(EpropertyTag)0x0e59, "undocumented" },
{(EpropertyTag)0x0e62, "undocumented" },
{(EpropertyTag)0x0e79, "TrustSender" },
{(EpropertyTag)0x0e9d, "undocumented" },
{(EpropertyTag)0x0ecd, "undocumented" },
{(EpropertyTag)0x0f02, "undocumented" },
{(EpropertyTag)0x0f03, "undocumented" },
{(EpropertyTag)0x0f0a, "undocumented" },
{(EpropertyTag)0x0ff7, "AccessLevel" },
{(EpropertyTag)0x0ff9, "RecordKey" },
{(EpropertyTag)0x0ffe, "ObjectType" },
{(EpropertyTag)0x0fff, "EntryId" },
Expand All @@ -123,6 +131,10 @@ class StandardProperties
{(EpropertyTag)0x1090, "FlagStatus" },
{(EpropertyTag)0x1091, "FlagCompleteTime" },
{(EpropertyTag)0x1095, "FollowupIcon" },
{(EpropertyTag)0x10f3, "undocumented" },
{(EpropertyTag)0x10f4, "AttributeHidden" },
{(EpropertyTag)0x10f5, "undocumented" },
{(EpropertyTag)0x10f6, "AttributeReadOnly" },
{(EpropertyTag)0x120b, "undocumented" },
{(EpropertyTag)0x1212, "undocumented" },
{(EpropertyTag)0x1213, "undocumented" },
Expand All @@ -132,6 +144,7 @@ class StandardProperties
{(EpropertyTag)0x3007, "CreationTime" },
{(EpropertyTag)0x3008, "LastModificationTime" },
{(EpropertyTag)0x300b, "SearchKey" },
{(EpropertyTag)0x300f, "undocumented" },
{(EpropertyTag)0x3010, "TargetEntryId" },
{(EpropertyTag)0x3014, "undocumented" },
{(EpropertyTag)0x3016, "ConversationIndexTracking" },
Expand Down Expand Up @@ -161,6 +174,7 @@ class StandardProperties
{(EpropertyTag)0x39ff, "AddressBookDisplayNamePrintable" },
{(EpropertyTag)0x3a00, "Account" },
{(EpropertyTag)0x3a02, "CallbackTelephoneNumber" },
{(EpropertyTag)0x3a05, "Generation" },
{(EpropertyTag)0x3a06, "GivenName" },
{(EpropertyTag)0x3a08, "BusinessTelephoneNumber" },
{(EpropertyTag)0x3a09, "HomeTelephoneNumber" },
Expand Down Expand Up @@ -195,6 +209,8 @@ class StandardProperties
{(EpropertyTag)0x3a2f, "Home2TelephoneNumber" },
{(EpropertyTag)0x3a40, "SendRichInfo" },
{(EpropertyTag)0x3a42, "Birthday" },
{(EpropertyTag)0x3a44, "MiddleName" },
{(EpropertyTag)0x3a45, "DisplayNamePrefix" },
{(EpropertyTag)0x3a4b, "TelecommunicationsDeviceForDeafTelephoneNumber" },
{(EpropertyTag)0x3a4f, "Nickname" },
{(EpropertyTag)0x3a50, "PersonalHomePage" },
Expand All @@ -211,6 +227,8 @@ class StandardProperties
{(EpropertyTag)0x3fdf, "AutoResponseSuppress" },
{(EpropertyTag)0x3fea, "HasDeferredActionMessages" },
{(EpropertyTag)0x3ff1, "MessageLocaleId" },
{(EpropertyTag)0x3ff8, "CreatorName" },
{(EpropertyTag)0x3ff9, "CreatorEntryId" },
{(EpropertyTag)0x3ffa, "LastModifierName" },
{(EpropertyTag)0x3ffb, "LastModifierEntryId" },
{(EpropertyTag)0x3ffd, "MessageCodepage" },
Expand Down Expand Up @@ -254,7 +272,11 @@ class StandardProperties
{(EpropertyTag)0x5ffd, "RecipientFlags" },
{(EpropertyTag)0x5fff, "RecipientTrackStatus" },
{(EpropertyTag)0x6001, "undocumented" },
{(EpropertyTag)0x6200, "undocumented" },
{(EpropertyTag)0x6201, "undocumented" },
{(EpropertyTag)0x65c6, "SecureSubmitFlags" },
{(EpropertyTag)0x65e0, "SourceKey" },
{(EpropertyTag)0x65e1, "ParentSourceKey" },
{(EpropertyTag)0x65e2, "ChangeKey" },
{(EpropertyTag)0x65e3, "PredecessorChangeList" },
{(EpropertyTag)0x65f5, "undocumented" },
Expand Down
2 changes: 2 additions & 0 deletions View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ public string DisplayValue
return String.Join(", ", Value);
else if (Value is string[])
return String.Join(",\r\n", Value);
else if (Value is List<byte[]>)
return String.Join(",\r\n", ((List<byte[]>)Value).Select(v => BitConverter.ToString(v)));
else if (Value == null)
return null;
else
Expand Down

0 comments on commit 31a55c1

Please sign in to comment.