Platform SDK: MAPI

Updating Properties

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

The following procedure illustrates how to use SetProps to update the message class, or PR_MESSAGE_CLASS 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;
spvMsgClass.Value.lpszA = "IPM.NewClass";
 
  1. Call the message's IMAPIProp::SetProps method to set the new message class.
hRes = lpMessage->SetProps(1, (LPSPropValue) &spvMsgClass, NULL);