Partager via


IPropData::HrGetPropAccess

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.

Retrieves the access level and status for one or more of the object's properties.

HRESULT HrGetPropAccess(
  LPSPropTagArray FAR * lppPropTagArray,
  ULONG FAR * FAR * lprgulAccess
);

Parameters

  • lppPropTagArray
    [in, out] On input, an array of property tags that indicate the properties for which to retrieve access levels and status; otherwise, a pointer to NULL, which indicates that HrGetPropAccess should retrieve access levels and status for all properties. On output, an array of property tags for which access and status flags were retrieved. The flags are stored in the array pointed to by the lprgulAccess parameter.

  • lprgulAccess
    [out] A pointer to an array of flag bitmasks. Each bitmask indicates the access levels or status, or both, for each of the properties identified in the array pointed to by the lpPropTagArray parameter. The two arrays are positional in that the first bitmask that lprgulAccess points to describes the first property that lpPropTagArray points to, and so on. For each property tag, the following flags can be set:

    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 for the properties were successfully returned.

Remarks

The IPropData::HrGetPropAccess method retrieves a set of flags that indicates the access level and status for one or more properties.

Notes to Callers:

You can use HrGetPropAccess for the following purposes:

  • To determine whether a client changed or deleted a writable property.

  • To prevent a client from changing or deleting a property by using the IMAPIProp methods.

If one of the properties in the property tag array pointed to by lppPropTagArray has been deleted, HrGetPropAccess sets the array entry to 0 on output. If you set lppPropTagArray to NULL and one of the object's properties has been deleted, the deleted property is returned in the array.

If a property has been modified, its IPROP_DIRTY flag is set in the corresponding entry in the array that lprgulAccess points to. Neither IPROP_READONLY nor IPROP_READWRITE will be set.

If a property has not been modified or deleted, only the IPROP_READONLY or IPROP_READWRITE flag will be set.

See Also

Reference

SPropTagArray

IPropData : IMAPIProp