次の方法で共有


Updating MAPI Properties

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.

Clients and service providers can update a property value by calling:

  • An object's IMAPIProp::SetProps method to update the value of one or more of an object's properties.

  • The HrSetOneProp function to update only one property at a time. Use HrSetOneProp only if the target object is local; this function can cause performance degradation when used with remote objects.

The following procedure illustrates how to use SetProps to update the message class, or PR_MESSAGE_CLASS_A (PidTagMessageClass) property, of a message.

To update the message class of a message

  1. Allocate an SPropValue structure for the message class and set its members as appropriate.

    SPropValue spvMsgClass;
    spvMsgClass.ulPropTag = PR_MESSAGE_CLASS_A;
    spvMsgClass.Value.lpszA = "IPM.NewClass";
    
    
  2. Call the message's IMAPIProp::SetProps method to set the new message class.

    hRes = lpMessage->SetProps(1, (LPSPropValue) &spvMsgClass, NULL);
    

See Also

Concepts

MAPI Property Overview