Handling Attachments with CMC

A CMC client application receives attachments in the form of an array of CMC_attachment structures on a message. Each element of this array specifies a file containing an attachment. The one exception to this rule is for embedded messages, which are received as a CMC message in the attachment extension.

CMC clients have no explicit method for distinguishing between OLE 1 and OLE 2 attachments. You should try opening the attachment as an IStorage object to determine whether the attachment is an OLE 2 object. If this fails, your client should try opening it as an OLE 1 IStream object. If both of these fail, the attachment should be treated as an ordinary data file.