LazyMAPI

MAPI Properties

MAPI Property: PR_ATTACH_DATA_OBJ
Description: Contains an attachment object typically accessed through the Object Linking and Embedding (OLE) Istorage interface.
Property ID: $3701
Property type: PT_OBJECT
Area: Message attachment

Remarks:
This property holds the attachment when the value of the PR_ATTACH_METHOD (PidTagAttachMethod) property is ATTACH_EMBEDDED_MSG or ATTACH_OLE. The OLE encoding type can be determined from PR_ATTACH_TAG (PidTagAttachTag).
For an attachment associated with the ATTACH_EMBEDDED_MSG value, the IMessage:IMAPIProp interface can be used for faster access.
For an embedded dynamic OLE object, the PR_ATTACH_DATA_OBJ property contains its own rendering information, and the PR_ATTACH_RENDERING (PidTagAttachRendering) property should be either nonexistent or empty.
For an OLE document file attachment, the message store provider must respond to an IMAPIProp::OpenProperty call on PR_ATTACH_DATA_OBJ and may optionally respond to a call on PR_ATTACH_DATA_BIN (PidTagAttachDataBinary). The PR_ATTACH_DATA_BIN and PR_ATTACH_DATA_OBJ properties share the same property identifier and thus are two renditions of the same property.
For a storage object, such as a compound file in OLE 2.0 docfile format, some service providers allow it to be opened with the MAPI IStreamDocfile interface, a subclass of IStream with no additional members, designed to optimize performance. The potential saving is enough to justify attempting to open PR_ATTACH_DATA_OBJ through IStreamDocfile. If MAPI_E_INTERFACE_NOT_SUPPORTED is returned, the client can then open PR_ATTACH_DATA_BIN with IStream.
If the client application or service provider cannot open an attachment subobject by using PR_ATTACH_DATA_OBJ with the help of PR_ATTACH_METHOD, it should use PR_ATTACH_DATA_BIN.