IVCmdNotifySink::CommandOther

HRESULT CommandOther(PVCMDNAME pName, PTSTR pszCommand);

Sent when a spoken phrase was either recognized as being from another application's command set or was not recognized. Along with the notification, the application receives the address of the phrase.

· Return value is ignored.

pName

[in] Address of a VCMDNAME structure that contains the name of the voice menu that has the recognized command. If this parameter contains NULL, the command was not recognized.

pszCommand

[in] Address of the command string. If this parameter contains NULL, the command was not recognized.

An application can use the CommandOther notification to monitor utterances and inform the user what was heard. An application should not rely on this notification for information about the recognition of its own commands. Most applications ignore this notification.

The command string contains the words actually spoken by the user. If the command contains a list name, the command string may not match the words of the command. For example, the string pointed to by pszCommand might be "Send mail to Fred" whereas the command string is "Send mail to name."

The notification is sent only to applications that set the dwFlags parameter of the IVoiceCmd::Register member function to the VCMDRF_ALLMESSAGES or VCMDRF_ALLBUTVUMETER value when the application registered to use voice commands on the site.

If two or more voice menus contain the same phrase and this phrase is recognized, it is indeterminate which of the menus will cause the engine to call the IVCmdNotifySink::CommandRecognize notification and which will cause it to call CommandOther. This happens only if the menus are all global or all window specific.