IVCmdAttributes::AwakeStateGet

This method retrieves the awake state for a voice command site.

Syntax

HRESULT AwakeStateGet( DWORD*pdwAwake );

Parameters

pdwAwake
[out] Pointer to a DWORD that receives the current state of speech recognition for the site. Set to TRUE if the site is awake, or to FALSE if it is asleep.

Return Values

NOERROR
The method successfully retrieved the awake state for a voice command site.
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 the site is awake, it listens for commands from any active voice menu for the active application. When the site is asleep, it listens for commands only from sleep menus—those that were activated with the dwFlags parameter of the IVCmdMenu::Activate method set to VWGFLAG_ASLEEP. Commands from such menus become active only when the site is asleep, and they become inactive when the site is awake. A sleep menu typically contains at least a “Wake up” command that resumes speech recognition.

See Also

IVCmdAttributes::AwakeStateSet