Send Feedback

The HrSetOneProp function sets or modifies the value of a single property on an object that support properties, such as an e-mail attachment, a MAPI container, a MAPI folder, a message, or a message store.

Note   This function may be deprecated in future versions of MAPI.


  LPSPropValue lpProp


  • lpMapiProp
    [in] Reference to the object on which the property value is to be set or modified.
  • lpProp
    [in] Pointer to the SPropValue structure which defines the property value to set or modify.

Return Values

This function returns an appropriate HRESULT value, such as the following:

  • S_OK
    The function successfully returned the value of a single property.
    The requested property cannot be found on the target object.


Unlike the IMAPIProp::SetProps method, the HrSetOneProp function never returns a warning. Because it sets only one property, it either succeeds or fails. For setting or changing multiple properties, use IMAPIProp::SetProps.

You can retrieve a single property with the HrGetOneProp function.


Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: mapiutil.h
Library: cemapi.lib

See Also

MAPI Functions | Messaging | MAPI Properties | HrGetOneProp | IMAPIProp::SetProps

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.