IVCmdAttributes::EnabledSet

This method sets whether speech recognition is enabled or disabled for a voice command site.

Syntax

HRESULT EnabledSet( DWORD dwEnabled );

Parameters

dwEnabled
[out] Specifies whether or not speech recognition is enabled. Set to TRUE to enable speech recognition, or to FALSE to disable it.

Return Values

NOERROR
The method successfully sets whether speech recognition is enabled or disabled.
E_INVALIDARG
The argument is invalid.
VCMDERR_INVALIDMODE
No site exists, the site does not support this attribute, or the voice command object is already registered with a site.
VCMDERR_OUTOFMEM
There is no more memory.
VCMDERR_VALUEOUTOFRANGE
The value is out of range.

Remarks

Calling EnabledSet allows the user to completely turn off speech recognition for a site so that nothing is recognized, including commands on sleep menus. For example, the user might want to disable speech recognition from the computer microphone during a meeting so that speech recognition remains off, even if a particpant inadvertently speaks a command on a sleep menu.

The enabled state for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.