The SetProps method updates one or more properties.
HRESULT SetProps ( ULONG cValues, LPSPropValue lpPropArray, LPSPropProblemArray FAR * lppProblems );
- [in] Count of property values pointed to by lpPropArray; cannot be zero.
- [in] Reference to an array of SPropValue structures holding property values to be updated; cannot be NULL.
- [in] Ignored.
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
- Indicates success.
- The property cannot be updated because it is read-only, computed by the service provider responsible for the object.
- The property type is invalid.
- An attempt was made to modify a read-only object or to access an object for which the user has insufficient permissions.
- The property cannot be updated because it is larger than the RPC buffer size.
- The property type is not the type expected by the calling implementation.
If you include a property tag for a property that is unsupported by the object and the implementation of SetProps allows the creation of new properties, the property is added to the object. Any previous value stored with the property identifier used for the new property is discarded.
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 relating 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 when SetProps returns this error value.
Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Send Feedback on this topic to the authors