IAccessible::get_accValue

The IAccessible::get_accValue method retrieves the value of the specified object. Not all objects have a value.

HRESULT get_accValue(
  VARIANT varID,
  BSTR* pszValue
);

Parameters

varID
[in] Specifies whether the value information retrieved is that of the object or of one of the object's child elements. This parameter is either CHILDID_SELF (to obtain information about the object) or a child ID (to obtain information about the object's child element). For more information about initializing the VARIANT structure, see How Child IDs Are Used in Parameters.
pszValue
[out, retval] Address of the BSTR that receives a localized string that contains the object's current value.

Return Values

If successful, returns S_OK.

If not successful, returns one of the following values or another standard COM error code. Although servers return these values, clients must always check output parameters to ensure that they contain valid values. For more information, see Checking IAccessible Return Values.

Error Description
DISP_E_MEMBERNOTFOUND The object does not support this property.
E_INVALIDARG An argument is invalid.

Remarks

Numeric values returned from scroll bar and trackbar accessible objects indicate percentages. They are integers between zero (0) and one hundred (100), inclusive, but might also be a limited range for example, between one (1) and sixteen (16). Also, some scroll bar and trackbar objects return strings that correspond to settings such as screen size or Internet security.

Note to server developers  Localize the string returned from this property.

Requirements

  Windows NT/2000/XP/Server 2003: Included in Windows 2000 and later.
  Windows 95/98/Me: Included in Windows 98 and later.
  Redistributable: Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
  Header: Declared in Oleacc.h.
  Library: Use Oleacc.lib.

See Also

Value Property

Community Additions

Show: