AccSetRunningUtilityState function (oleacc.h)
Sets system values that indicate whether an assistive technology (AT) application's current state affects functionality that is typically provided by the system.
HRESULT AccSetRunningUtilityState(
[in] HWND hwndApp,
[in] DWORD dwUtilityStateMask,
[in] DWORD dwUtilityState
);
[in] hwndApp
Type: HWND
The handle of the AT application window. This parameter must not be NULL.
[in] dwUtilityStateMask
Type: DWORD
A
mask that indicates the system values being set. It can be a combination of the following values:
[in] dwUtilityState
Type: DWORD
The new settings for the system values indicated by dwUtilityStateMask. This parameter can be zero to reset the system values, or a combination of the following values.
Type: STDAPI
If successful, returns S_OK.
If not successful, returns a standard COM error code.
Before it exits, an AT application should reset any system values that it previously set.
This function requires the calling process to have UIAccess or higher privileges. If the caller does not have the required privileges, the call to AccSetRunningUtilityState fails and returns E_ACCESSDENIED. For more information, see Security Considerations for Assistive Technologies and /MANIFESTUAC (Embeds UAC information in manifest).
This code example shows how to call the AccSetRunningUtilityState function.
if (SUCCEEDED(hr))
{
// Tell the system that an AT application has registered with the
// touch redirector.
hr = AccSetRunningUtilityState(hwndTouchWindow,
ANRUS_TOUCH_MODIFICATION_ACTIVE,
ANRUS_TOUCH_MODIFICATION_ACTIVE);
if (FAILED(hr))
{
MyErrorHandler(hr); // Application-defined error handler
}
}
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | oleacc.h |
Library | Oleacc.lib |
DLL | Oleacc.dll |