IPropData::HrSetPropAccess
Applies to: Outlook 2013 | Outlook 2016
Sets the access level or status for one or more of the object's properties.
HRESULT HrSetPropAccess(
LPSPropTagArray lpPropTagArray,
ULONG FAR * rgulAccess
);
Parameters
lpPropTagArray
[in] A pointer to an array of property tags that indicate the properties to be modified.
rgulAccess
[in] An array of flag bitmasks. Each bitmask indicates the access levels or status, or both, for each of the properties identified in the array that the lpPropTagArray parameter points to. The two arrays are positional in that the first bitmask in rgulAccess describes the first property that lpPropTagArray points to, and so on. For each property tag, one access-level flag and one status flag can be set. The following table shows the possible flags.
Access-level flag | Status flag |
---|---|
IPROP_READONLY, which indicates that the property cannot be modified |
IPROP_CLEAN, which indicates that the property has not been modified. |
IPROP_READWRITE, which indicates that the property can be modified. | IPROP_DIRTY, which indicates that the property has been modified. |
Return value
S_OK
The access-level and status flags have been successfully set.
MAPI_E_NO_ACCESS
An attempt was made to set a property on a read-only object or an object for which the caller has insufficient permissions.
MAPI_E_INVALID_PARAMETER
The rgulAccess parameter contains an invalid combination of flags, such as IPROP_READONLY and IPROP_READWRITE.
Remarks
The IPropData::HrSetPropAccess method changes the access level and status for the properties that are identified by the property tags in the SPropTagArray structure pointed to by the lpPropTagArray parameter. For each property, there is a corresponding entry in the rgulAccess array. The entry can be set to one flag that indicates the property's access level and another flag that indicates its status.
Notes to callers
Use HrSetPropAccess to determine when a particular property value changes and to change the access level for one or more of an object's properties.