IAccessible::get_accValue method (oleacc.h)

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


HRESULT get_accValue(
  [in]          VARIANT varChild,
  [out, retval] BSTR    *pszValue


[in] varChild


Specifies whether the retrieved value information belongs to the object or 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.

[out, retval] pszValue

Type: BSTR*

Address of the BSTR that receives a localized string that contains the object's current value.

Return value


If successful, returns S_OK.

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

Error Description
The object does not support this property.
An argument is not valid.


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.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header oleacc.h
Library Oleacc.lib
DLL Oleacc.dll
Redistributable Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95

See also


Value Property