This method supplies a voice-aware application with the equivalent of a spoken voice command.
HRESULT CmdMimic( PVCMDNAME pMenu, PTSTR pszCommand);
CmdMimic parses the command string and eliminates white space and punctuation, then compares the result with each command on the voice menu until it finds a match. The comparison is case-insensitive, and the command string can include phrases from lists. If the string matches a command in the voice menu, it is recognized; otherwise, the method returns an error.
The VCMDERR_MENUDOESNOTEXIST error is returned if the menu does not exist or is not active.
An application can call CmdMimic to play back voice macros to another application, similar to playing back keystrokes and mouse messages in Windows.
The voice menu must be active before an application can mimic its commands.