IVCmdAttributes::AwakeStateGet

HRESULT AwakeStateGet(DWORD *pdwAwake);

Retrieves the awake state for a voice-command site.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
VCMDERR_INVALIDMODE
VCMDERR_OUTOFMEM
VCMDERR_VALUEOUTOFRANGE

pdwAwake

[out] Address of a variable that receives the current state of speech recognition for the site. This parameter is TRUE if the site is awake or FALSE if it is asleep.

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 member function set to the VWGFLAG_ASLEEP value. 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 a "Wake up!" command that resumes speech recognition, and it may contain other commands.