Skip to content

Latest commit

 

History

History
195 lines (143 loc) · 5.61 KB

nf-oleacc-accsetrunningutilitystate.md

File metadata and controls

195 lines (143 loc) · 5.61 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:oleacc.AccSetRunningUtilityState
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.
ANRUS_ON_SCREEN_KEYBOARD_ACTIVE
ANRUS_PRIORITY_AUDIO_ACTIVE
ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK
ANRUS_TOUCH_MODIFICATION_ACTIVE
AccSetRunningUtilityState
AccSetRunningUtilityState function [Windows Accessibility]
oleacc/AccSetRunningUtilityState
winauto.accsetrunningutilitystate
winauto\accsetrunningutilitystate.htm
WinAuto
0AEDDE0D-D8E2-4C9E-AB2B-2FF0ACC3695D
12/05/2018
ANRUS_ON_SCREEN_KEYBOARD_ACTIVE, ANRUS_PRIORITY_AUDIO_ACTIVE, ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK, ANRUS_TOUCH_MODIFICATION_ACTIVE, AccSetRunningUtilityState, AccSetRunningUtilityState function [Windows Accessibility], oleacc/AccSetRunningUtilityState, winauto.accsetrunningutilitystate
oleacc.h
Windows
Windows 8 [desktop apps only]
Windows Server 2012 [desktop apps only]
Oleacc.lib
Oleacc.dll
Windows
19H1
AccSetRunningUtilityState
oleacc/AccSetRunningUtilityState
c++
APIRef
kbSyntax
DllExport
Oleacc.dll
AccSetRunningUtilityState

AccSetRunningUtilityState function

-description

Sets system values that indicate whether an assistive technology (AT) application's current state affects functionality that is typically provided by the system.

-parameters

-param hwndApp [in]

Type: HWND

The handle of the AT application window. This parameter must not be NULL.

-param dwUtilityStateMask [in]

Type: DWORD

A
mask that indicates the system values being set. It can be a combination of the following values:

ANRUS_ON_SCREEN_KEYBOARD_ACTIVE

ANRUS_TOUCH_MODIFICATION_ACTIVE

ANRUS_PRIORITY_AUDIO_ACTIVE

ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK

-param dwUtilityState [in]

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.

Value Meaning
ANRUS_ON_SCREEN_KEYBOARD_ACTIVE
0x0000001
The AT application is providing an on-screen keyboard.
ANRUS_TOUCH_MODIFICATION_ACTIVE
0x0000002
The AT application is consuming redirected touch input.
ANRUS_PRIORITY_AUDIO_ACTIVE
0x0000004
The AT application is relying on audio (such as text-to-speech) to convey essential information to the user and should remain audible over other system sounds.
ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK
0x0000008
The AT application is relying on audio (such as text-to-speech) to convey essential information to the user but should not change relative to other system sounds.

-returns

Type: STDAPI

If successful, returns S_OK.

If not successful, returns a standard COM error code.

-remarks

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).

Examples

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
    }
}

-see-also

Security Considerations for Assistive Technologies