ITnef::AddProps
The ITnef::AddProps
method allows the calling service provider or gateway to add properties to
include in the encapsulation of a message or an attachment.
Quick Info
See ITnef
: IUnknown
HRESULT AddProps(
ULONG ulFlags,
|
|
ULONG ulElemID,
|
|
LPVOID lpvData,
|
|
LPSPropTagArray lpPropList |
|
) |
|
Parameters
ulFlags
[in] Bitmask
of flags that controls how properties are included in or excluded from
encapsulation. The following flags can be set:
TNEF_PROP_ATTACHMENTS_ONLY
Encodes only
the properties in the lpPropList parameter that are part of attachments
within the message.
TNEF_PROP_CONTAINED
Encodes only
properties from the attachment specified by the ulElemID parameter. If
the lpvData parameter is non-null, then the data pointed to is written
into the attachment s encapsulation in the transport file indicated in the PR_ATTACH_TRANSPORT_NAME
TNEF_PROP_CONTAINED_TNEF
Encodes only
properties from the message or attachment specified by ulElemID. If this
flag is set, the value in lpvData must be an ISTREAMTNEF pointer.
TNEF_PROP_EXCLUDE
Encodes all
properties not specified in lpPropList.
TNEF_PROP_INCLUDE
Encodes all
properties specified in lpPropList.
TNEF_PROP_MESSAGE_ONLY
Encodes only
those properties specified in lpPropList that are part of the message
itself.
ulElemID
[in] An
attachment s PR_ATTACH_NUM
lpvData
[in] Pointer
to attachment data used to replace the data of the attachment specified in ulElemID.
The lpvData parameter should be NULL unless TNEF_PROP_CONTAINED or TNEF_PROP_CONTAINED_TNEF
is set in ulFlags.
lpPropList
[in] Pointer
to the list of properties to include in or exclude from encapsulation.
Return Values
S_OK
The call
succeeded and has returned the expected value or values.
Remarks
Transport
providers, message store providers, and gateways call the ITnef::AddProps
method to list properties to be included in or excluded from the TNEF
encapsulation of a message or an attachment. Using successive calls, the
provider or gateway can specify a list of properties to add and encode or to
exclude from being encoded. Providers and gateways can also use AddProps
to provide information on any special handling attachments should be given.
AddProps is only supported for TNEF objects opened with the
TNEF_ENCODE flag for the OpenTnefStream
Note that no
actual TNEF encoding happens for AddProps until the ITnef::Finish
See Also