IPropData::HrSetPropAccess

The IPropData::HrSetPropAccess method sets the access level or status for one or more of the object s properties.

Quick Info

See IPropData : IMAPIProp164A_SY.

 

HRESULT HrSetPropAccess(

    LPSPropTagArray lpPropTagArray,

 

    ULONG FAR * rgulAccess

 

   )

 

 

Parameters

lpPropTagArray

[in] Pointer to an array of property tags indicating the properties to be modified.

rgulAccess

[in] Array of bitmasks of flags. Each bitmask indicates the access levels and/or status for each of the properties identified in the array pointed to by lpPropTagArray. The two arrays are positional in that the first bitmask in rgulAccess describes the first property pointed to by lpPropTagArray and so on.

For each property tag, one access level flag and one status flag can be set. The choices are as follows:

 

Access level flag

Status flag

IPROP_READONLY, indicating that the property can not be modified

IPROP_CLEAN, indicating that the property has not been modified.

IPROP_READWRITE, indicating that the property can be modified.

IPROP_DIRTY, indicating that the property has been modified.

 

Return Values

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 lpPropTagArray. 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 for determining when a particular property value changes and to change the access level for one or more of an object s properties.

See Also

SPropTagArray