@paulbright,
Data type 258 is binary array and Data type 20 is LongLong Data Type. LongLong ( LongLong integer) variables are stored as signed 64-bit (8-byte) numbers ranging in value from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. LongLong is a valid declared type only on 64-bit platforms. Following is a sample where both type of values are first written and then read. Please give it a try and share the feedback. If it does not fulfill requirement, please share the sample MSG file for our analysis here.
// Create a sample Message
MapiMessage msg = new MapiMessage("user1@gmail.com", "user2@gmail.com", "This is subject", "This is body");
IList values = new ArrayList();
//Signed or unsigned 64-bit integer. This property type is the same as PT_I8 and the OLE type VT_I8.
//PT_LONGLONG = 20,
//Write longlong data
values = new ArrayList();
values.Add((long)30456);
values.Add((long)40655);
msg.SetProperty(new MapiProperty(0x23901014, values));
//Read longlong data
MapiProperty longlongProp = msg.Properties[0x23901014];
var value2 = (long[])longlongProp.GetValue();
foreach (var lng in value2)
Console.WriteLine(lng);
//SBinary structure value, a counted byte array.
//PT_BINARY = 258,
//Write binary property data
values = new ArrayList();
values.Add(new byte[] { 1, 2, 4, 5, 6, 7, 5, 4, 3, 5, 6, 7, 8, 6, 4, 3, 4, 5, 6, 7, 8, 6, 5, 4, 3, 7, 8, 9, 0, 2, 3, 4, });
msg.SetProperty(new MapiProperty(0x23901102, values));
//Read Binary property data
MapiProperty binaryProp = msg.Properties[0x23901102];
var value = ((byte[][])binaryProp.GetValue())[0];
foreach (var byt in value)
Console.WriteLine(byt);