Platform SDK: MAPI

PR_ATTACH_DATA_OBJ

The PR_ATTACH_DATA_OBJ property contains an attachment object typically accessed through the OLE IStorage interface.

Quick Info

Header file: MAPITAGS.H
May be exposed by: Attachment subobjects
Identifier: 0x3701
Property type: PT_OBJECT
Property tag: 0x3701000D
Corresponding X.400 attribute IM_EXTERNAL_DATA

Remarks

The PR_ATTACH_DATA_OBJ property holds the attachment when the value of the PR_ATTACH_METHOD property is ATTACH_EMBEDDED_MSG or ATTACH_OLE. The OLE encoding type can be determined from PR_ATTACH_TAG.

For an attachment associated with the ATTACH_EMBEDDED_MSG value, the IMessage:IMAPIProp inferface 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 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. 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 using PR_ATTACH_DATA_OBJ with the help of PR_ATTACH_METHOD, it should use PR_ATTACH_DATA_BIN.

For more information on OLE interfaces and formats, see the OLE Programmer's Reference.

See Also

Attachment Properties