IValueProvider::SetValue method (uiautomationcore.h)

Sets the value of control.

Syntax

HRESULT SetValue(
  [in] LPCWSTR val
);

Parameters

[in] val

Type: LPCWSTR

The value to set. The provider is responsible for converting the value to the appropriate data type.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Single-line edit controls support programmatic access to their contents by implementing IValueProvider. However, multi-line edit controls do not implement IValueProvider; instead they provide access to their content by implementing ITextProvider.

Controls such as ListItem and TreeItem must implement IValueProvider if the value of any of the items is editable, regardless of the current edit mode of the control. The parent control must also implement IValueProvider if the child items are editable.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See also

IValueProvider

UI Automation Providers Overview