IAccPropServices::SetPropValue method

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 accessible element they want to annotate, they can use one of the following methods:

Syntax

HRESULT SetPropValue(
  const BYTE *pIDString,
  DWORD      dwIDStringLen,
  MSAAPROPID idProp,
  VARIANT    var
);

Parameters

pIDString

Type: const BYTE*

Identifies the accessible element that is to be annotated.

dwIDStringLen

Type: DWORD

Specifies the length of the string identified by the pIDString parameter.

idProp

Type: MSAAPROPID

Specifies the property of the accessible element to be annotated.

var

Type: VARIANT

Specifies a new value for the property.

Return Value

Type: HRESULT

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

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header oleacc.h (include OleAcc.h Include Initguid.h first.)
DLL Oleacc.dll
Redistributable Active Accessibility 2.0 RDK on Windows NT 4.0 with SP6 and later and Windows 98