Share via


IAccPropServices::SetPropValue

Use SetPropValue to identify the accessible element to be annotated, specify the property to be annotated, and provide a new value for that property.

If server developers know the HWND of the object they want to annotate, they can use one of the following methods:

HRESULT SetPropValue (
const BYTE* pIDString,DWORDdwIDStringLen,MSAAPROPIDidProp,VARIANTvar);

Parameters

  • pIDString, dwIDStringLen
    [in] Identify the accessible element that is to be annotated.
  • idProp
    [in] Specifies which property of that element is to be annotated.
  • var
    [in] Specifies a new value for that property.

Return Values

If successful, returns S_OK.

Returns E_INVALIDARG if idProp is not a supported property, if var is not a supported type for that property, or if the identity string is not valid.

May return other error codes under exceptional error conditions such as low memory.

Remarks

See the support section for a list of supported properties and their expected types. Note that currently some properties are supported only when a callback is used and cannot be specified directly using this method.

Requirements

**  Windows NT/2000/XP/Server 2003:** Included in Windows XP and Windows Server 2003.
**  Windows 95/98/Me:** Unsupported.
**  Redistributable:** Requires Active Accessibility 2.0 RDK on Windows NT 4.0 SP6 and Windows 98.
**  Header:** Declared in Oleacc.h; include Initguid.h before including Oleacc.h.