Platform SDK: MAPI |
The SetAttribIMsgOnIStg function sets or alters attributes of properties on an IMessage object supplied by the OpenIMsgOnIStg function.
Header file: | IMESSAGE.H |
Implemented by: | MAPI |
Called by: | Client applications and message store providers |
HRESULT SetAttribIMsgOnIStg( LPVOID lpObject, LPSPropTagArray lpPropTags, LPSPropAttrArray lpPropAttrs, LPSPropProblemArray FAR * lppPropProblems );
Property attributes can only be accessed on property objects, that is, objects implementing the IMAPIProp : IUnknown interface. To make MAPI properties available on an OLE structured storage object, OpenIMsgOnIStg builds an IMessage : IMAPIProp object on top of the OLE IStorage object. The property attributes on such objects can be set or altered with SetAttribIMsgOnIStg and retrieved with GetAttribIMsgOnIStg.
Note GetAttribIMsgOnIStg and SetAttribIMsgOnIStg do not operate on all IMessage objects. They are only valid for IMessage-on-IStorage objects returned by OpenIMsgOnIStg.
In the lpPropAttrs parameter, the number and position of the attributes must match the number and position of the property tags passed in the lpPropTags parameter.
The SetAttribIMsgOnIStg function is used to make message properties read-only when required by the IMessage schema. The sample message store provider uses it for this purpose. For more information, see Messages.