Platform SDK: MAPI |
The IPropData::HrSetObjAccess method sets the access level for the object.
HRESULT HrSetObjAccess( ULONG ulAccess );
The IPropData::HrSetObjAccess method sets the access level for an entire object, rather than for individual properties. HrSetObjAccess can be used to change the access level established when the object was created.
To set an access level on a property, first call HrSetObjAccess with the IPROP_READWRITE flag set in the ulAccess parameter to make the object modifiable. Then call IPropData::HrSetPropAccess, specifying the target property in the array pointed to by lpPropTagArray.
To create an object with properties that will be read-only to clients, create a read/write object, add the necessary properties, and then call HrSetObjAccess to change the object's access to read-only.
HrSetObjAccess can also be used to prevent clients from creating new properties.