Partager via


IAccessible::put_accValue

The IAccessible::put_accValue method sets the value of the specified object. Not all objects have a value.

HRESULT put_accValue(
VARIANTvarID,BSTR pszValue);

Parameters

  • varID
    [in] Specifies whether the value information being set is that of the object or of one of the object's child elements. This parameter is either CHILDID_SELF (to set information on the object) or a child ID (to set information about the object's child element). For more information about initializing the VARIANT structure, see How Child IDs Are Used in Parameters.
  • pszValue
    [in] A localized string that contains the object's 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

The IAccessible::put_accValue method is supported for some user interface (UI) elements (usually edit controls). For UI elements that do not support this method, control-specific APIs are used instead. For more information, see Supported User Interface Element Reference.

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.