From 47136753fa824c2b898639d291e9060f370c70b8 Mon Sep 17 00:00:00 2001 From: Stephen Griffin Date: Mon, 12 Feb 2024 16:37:52 -0500 Subject: [PATCH] parse address book prop tag names --- MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs b/MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs index 604cd77..e95af2b 100644 --- a/MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs +++ b/MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs @@ -1,5 +1,6 @@ namespace MAPIInspector.Parsers { + using MapiInspector; using System; using System.Collections.Generic; using System.IO; @@ -4307,6 +4308,11 @@ public class AddressBookPropertyValue : BaseStructure /// private CountWideEnum countWide; + /// + /// Source property tag information + /// + public AnnotatedComment PropertyTag; + /// /// Initializes a new instance of the AddressBookPropertyValue class. /// @@ -4367,13 +4373,18 @@ public class AddressBookTaggedPropertyValue : BaseStructure /// /// An unsigned integer that identifies the property. /// - public ushort PropertyId; + public PidTagPropertyEnum PropertyId; /// /// An AddressBookPropertyValue structure /// public AddressBookPropertyValue PropertyValue; + /// + /// Source property tag information + /// + public AnnotatedComment PropertyTag; + /// /// Parse the AddressBookTaggedPropertyValue structure. /// @@ -4382,10 +4393,11 @@ public override void Parse(Stream s) { base.Parse(s); this.PropertyType = (PropertyDataType)this.ReadUshort(); - this.PropertyId = this.ReadUshort(); + this.PropertyId = (PidTagPropertyEnum)this.ReadUshort(); AddressBookPropertyValue addressBookValue = new AddressBookPropertyValue(this.PropertyType); addressBookValue.Parse(s); this.PropertyValue = addressBookValue; + this.PropertyTag = $"{PropertyType}:{Utilities.EnumToString(PropertyId)}"; } } #endregion @@ -4445,6 +4457,11 @@ public class AddressBookTypedPropertyValue : BaseStructure /// public AddressBookPropertyValue PropertyValue; + /// + /// Source property tag information + /// + public AnnotatedComment PropertyTag; + /// /// Parse the AddressBookTypedPropertyValue structure. /// @@ -4481,6 +4498,11 @@ public class AddressBookFlaggedPropertyValue : BaseStructure /// private PropertyDataType propertyDataType; + /// + /// Source property tag information + /// + public AnnotatedComment PropertyTag; + /// /// Initializes a new instance of the AddressBookFlaggedPropertyValue class. /// @@ -4540,6 +4562,11 @@ public class AddressBookFlaggedPropertyValueWithType : BaseStructure /// public AddressBookPropertyValue PropertyValue; + /// + /// Source property tag information + /// + public AnnotatedComment PropertyTag; + /// /// Parse the AddressBookFlaggedPropertyValueWithType structure. /// @@ -4628,12 +4655,14 @@ public override void Parse(Stream s) { AddressBookPropertyValue propValue = new AddressBookPropertyValue(propTag.PropertyType, this.ptypMultiCountSize); propValue.Parse(s); + propValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}"; addrRowValue = propValue; } else { AddressBookTypedPropertyValue typePropValue = new AddressBookTypedPropertyValue(); typePropValue.Parse(s); + typePropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}"; addrRowValue = typePropValue; } } @@ -4643,12 +4672,14 @@ public override void Parse(Stream s) { AddressBookFlaggedPropertyValue flagPropValue = new AddressBookFlaggedPropertyValue(propTag.PropertyType); flagPropValue.Parse(s); + flagPropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}"; addrRowValue = flagPropValue; } else { AddressBookFlaggedPropertyValueWithType flagPropValue = new AddressBookFlaggedPropertyValueWithType(); flagPropValue.Parse(s); + flagPropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}"; addrRowValue = flagPropValue; } }