ITnef::SetProps
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Sets the value of one or more properties for an encapsulated message or attachment without modifying the original message or attachment.
HRESULT SetProps(
ULONG ulFlags,
ULONG ulElemID,
ULONG cValues,
LPSPropValue lpProps
);
Parameters
ulFlags
[in] A bitmask of flags that controls how property values are set. The following flag can be set:- TNEF_PROP_CONTAINED
Encodes only properties from the message or attachment specified by the ulElemID parameter.
- TNEF_PROP_CONTAINED
ulElemID
[in] An attachment's PR_ATTACH_NUM (PidTagAttachNumber) property, which contains a number that uniquely identifies the attachment in its parent message.cValues
[in] The number of property values in the SPropValue structure pointed to by the lpProps parameter.lpProps
[in] A pointer to an SPropValue structure that contains the property values of the properties to set.
Return Value
- S_OK
The call succeeded and returned the expected value or values.
Remarks
Transport providers, message store providers, and gateways call the ITnef::SetProps method to set properties to include in the encapsulation of a message or an attachment without modifying the original message or attachment. Any properties set with this call override existing properties in the encapsulated message.
SetProps is supported only for TNEF objects that are opened with the TNEF_ENCODE flag for the OpenTnefStream or OpenTnefStreamEx function. Any number of properties can be set with this call.
Note |
---|
No actual TNEF encoding for SetProps happens until after the ITnef::Finish method is called. This functionality means that pointers passed into SetProps must remain valid until after the call to Finish is made. At that point, all objects and data passed into SetProps calls can be released or freed. |