Partager via


IMAPIProp::SetProps (Compact 7)

3/12/2014

This method updates one or more properties.

Syntax

HRESULT SetProps (
  ULONG cValues,
  LPSPropValue lpPropArray,
  LPSPropProblemArray FAR * lppProblems
);

Parameters

  • cValues
    [in] Count of property values that lpPropArray points to. Cannot be zero.
  • lpPropArray
    [in] Pointer to a reference to an array of SPropValue structures that hold property values to update. Cannot be NULL.
  • lppProblems
    [in] Ignored.

Return Value

The following table shows the possible values.

Value Description

S_OK

The method succeeded.

MAPI_E_INVALID_TYPE

The property type is invalid.

MAPI_E_NOT_ENOUGH_MEMORY

The property cannot be updated because it is larger than the Remote Procedure Call (RPC) buffer size.

E_FAIL

The method failed due to an unspecified error.

E_INVALIDARG

The method failed because one or more of the parameters is not valid.

E_OUTOFMEMORY

The method failed because it needs more memory resources

E_UNEXPECTED

The method failed due to an unexpected error.

Remarks

If you include a property tag for a property that the object does not support and the implementation of the SetProps method allows the creation of new properties, this call adds the property to the object and discards any previous value stored with the property identifier that was used for the new property.

The S_OK return value does not guarantee that all of the properties were successfully updated. Some providers cache SetProps calls until they receive a call that requires provider intervention, such as IMAPIProp::GetProps. Therefore, it is possible to receive error values that relate to the SetProps call with the later calls.

When updating large properties, SetProps can fail and return MAPI_E_NOT_ENOUGH_MEMORY. There is no maximum size for properties, and different objects can have different limits. If you deal with potentially large properties, call OpenProperty instead of SetProps if SetProps returns this error value.

The value of PR_SENDER_NAME_W cannot be set directly. This value is set through the PR_SENDER_NAMEproperty. For more information about the message properties, see Message Recipient Properties.

Requirements

Header

mapidefs.h

Library

cemapi.lib

See Also

Reference

IMAPIProp
IMAPIProp::GetProps
MAPIFreeBuffer
SPropProblemArray
SPropValue