Share via


IPropData::HrSetObjAccess

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Sets the access level for the object.

HRESULT HrSetObjAccess(
  ULONG ulAccess
);

Parameters

  • ulAccess
    [in] A bitmask of flags that specifies the object's access level. One of the following flags can be set:

    • IPROP_READONLY
      Sets the object's access level to read-only.

    • IPROP_READWRITE
      Sets the object's access level to read/write.

Return Value

  • S_OK
    The object's access level was successfully set.

Remarks

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.

Notes to Callers

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 the IPropData::HrSetPropAccess method, specifying the target property in the array pointed to by the lpPropTagArray parameter.

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.

You can also use HrSetObjAccess to prevent clients from creating new properties.

See Also

Reference

IPropData::HrGetPropAccess

IPropData::HrSetPropAccess

IPropData : IMAPIProp