| Platform SDK: Agent | 
HRESULT ListeningState( long dwCharacterID, // character ID long bListening, // listening mode state long dwCause // cause );
Notifies a client application when the Listening mode changes.
| Value | Description | 
|---|---|
| const unsigned long LSCOMPLETE_CAUSE_PROGRAMDISABLED = 1; | Listening mode was turned off by program code. | 
| const unsigned long LSCOMPLETE_CAUSE_PROGRAMTIMEDOUT = 2; | Listening mode (turned on by program code) timed out. | 
| const unsigned long LSCOMPLETE_CAUSE_USERTIMEDOUT = 3; | Listening mode (turned on by the Listening key) timed out. | 
| const unsigned long LSCOMPLETE_CAUSE_USERRELEASEDKEY = 4; | Listening mode was turned off because the user released the Listening key. | 
| const unsigned long LSCOMPLETE_CAUSE_USERUTTERANCEENDED = 5; | Listening mode was turned off because the user finished speaking. | 
| const unsigned long LSCOMPLETE_CAUSE_CLIENTDEACTIVATED = 6; | Listening mode was turned off because the input active client was deactivated. | 
| const unsigned long LSCOMPLETE_CAUSE_DEFAULTCHARCHANGE = 7  | 
Listening mode was turned off because the default character was changed. | 
| const unsigned long LSCOMPLETE_CAUSE_USERDISABLED = 8  | 
Listening mode was turned off because the user disabled speech input. | 
This event is sent to all clients when the Listening mode begins after the user presses the Listening key or when its time-out ends, or when the input-active client calls the IAgentCharacterEx::Listen method with True or False.
The event returns values to the clients that currently have this character loaded. All other clients receive a null character (empty string).