[Microsoft Agent is deprecated as of Windows 7, and may be unavailable in subsequent versions of Windows.]

HRESULT SetGlobalVoiceCommandsEnabled(
 long bEnable  // Enabled setting for Agent's global voice commands

Sets the Enabled property for the voice grammar of Microsoft Agent's global commands.

  • Returns S_OK to indicate the operation was successful.


A Boolean value that sets whether the voice grammar of Agent's global commands is enabled. True enables the voice grammar; False disables it.

Microsoft Agent automatically adds voice parameters (grammar) for opening and closing the Voice Commands Window and for showing and hiding the character. When set to False, Agent disables any voice parameters for these commands as well as the voice parameters for the Caption of other client's Command objects. This enables you to eliminate these from your client's current active grammar. However, because this potentially blocks voice access to other clients, reset this property to True after processing the user's voice input.

Disabling the property does not affect the character's pop-up menu. The global commands added by the server will still appear. You cannot remove them from the pop-up menu.

See Also