HRESULT Remove(DWORD dwCmdStart, DWORD dwCmdNum, DWORD dwFlag);
Removes the specified commands from the voice menu.
· Returns NOERROR if successful, or one of these error values:
E_INVALIDARG
VCMDERR_INVALIDCHAR
VCMDERR_MENUTOOCOMPLEX
VCMDERR_OUTOFDISK
VCMDERR_OUTOFMEM
VCMDERR_VALUEOUTOFRANGE
dwCmdStart
[in] Number of the first command in the menu to remove. Command positions are sequential, starting with 1 for the first command on the menu. If dwFlag is the VCMD_BY_IDENTIFIER value, this parameter is ignored.
dwCmdNum
[in] Number of commands to remove or the identifier of the commands, depending on the value of dwFlag. If the sum of dwCmdStart and dwCmdNum exceeds the total number of commands in the menu, the function removes as many commands as possible.
dwFlag
[in] Flag that identifies the nature of dwCmdNum. This parameter can be one of these values:
VCMD_BY_IDENTIFIER
VCMD_BY_POSITION
For best results, you should deactivate the voice menu before calling Remove. Otherwise, the menu must be deactivated, recompiled, and reactivated before Remove returns. If the menu is already deactivated when Remove is called, the menu is not recompiled until the application activates it again.