IVCmdAttributes::EnabledGet

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

Syntax

HRESULT EnabledGet( DWORD *dwEnabled );

Parameters

dwEnabled
[out] Specifies whether or not speech recognition is enabled. Set to TRUE if speech recognition is enabled for the site, or to FALSE if it is disabled.

Return Values

NOERROR
The method successfully retrieved 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

When speech recognition is disabled, the engine does not recognize any command from any menu, whether speech recognition is awake or asleep or any menus are active. An application would use the IVCmdAttributes::EnabledSet method to allow the user to turn speech recognition completely off, as opposed to suspending speech recognition temporarily by putting the site to sleep.

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