The PR_ATTACH_METHOD property contains a MAPI-defined constant representing the way the contents of an attachment can be accessed.
Header file: | MAPITAGS.H |
Must be exposed by: | Attachment subobjects |
Identifier: | 0x3705 |
Property type: | PT_LONG |
Property tag: | 0x37050003 |
The PR_ATTACH_METHOD property can have exactly one of the following values:
When created, all attachment objects have an initial PR_ATTACH_METHOD value of NO_ATTACHMENT.
Client applications and service providers are only required to support the attachment method represented by the ATTACH_BY_VALUE value. The other attachment methods are optional. The message store does not enforce any consistency between the value of PR_ATTACH_METHOD and the values of the other attachment properties.
Universal naming convention (UNC) names are recommended for fully qualified paths, which should be used with ATTACH_BY_REFERENCE and ATTACH_BY_REF_ONLY. With ATTACH_BY_REF_RESOLVE, an absolute path is faster, because the MAPI spooler converts the attachment to ATTACH_BY_VALUE.
If ATTACH_BY_REFERENCE is set, PR_ATTACH_DATA_BIN must be empty. An outbound gateway can turn an ATTACH_BY_REFERENCE attachment into an ATTACH_BY_VALUE attachment by copying the attachment data into the PR_ATTACH_DATA_BIN property.
If ATTACH_BY_REF_RESOLVE is set, PR_ATTACH_DATA_BIN must be empty. When the message that contains the ATTACH_BY_REF_RESOLVE attachment is sent, the MAPI spooler copies the attachment data into an ATTACH_BY_VALUE attachment. This resolution process places the attachment data in PR_ATTACH_DATA_BIN.
If ATTACH_BY_REF_ONLY is set, PR_ATTACH_DATA_BIN must be empty, and the messaging system never resolves the attachment reference. Use this value when you want to send the link but not the data.
When the OLE object is in OLE 2.0 IStorage format, the data are accessible through PR_ATTACH_DATA_OBJ. When the OLE object is in OLE 1.0 OLESTREAM format, the data are accessible through PR_ATTACH_DATA_BIN as an IStream. The type of the OLE encoding can be determined by the PR_ATTACH_TAG value.
For more information on OLE interfaces and formats, see the OLE Programmer's Reference.
Attachment Properties, PR_STORE_SUPPORT_MASK