IVCmdAttributes::MicrophoneGet

HRESULT MicrophoneGet(PTSTR pszMicrophone, DWORD dwSize,
DWORD *pdwNeeded);

Retrieves the name of the microphone used by a voice-command site.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
VCMDERR_INVALIDMODE
VCMDERR_NOTSUPPORTED
VCMDERR_OUTOFMEM
VCMDERR_VALUEOUTOFRANGE

pszMicrophone

[in/out] Address of a buffer that receives a string identifying the current microphone.

dwSize

[in] Size, in bytes, of the buffer specified by pszMicrophone. If the buffer is too small, the function returns an error and fills pdwNeeded with the number of bytes needed to store the microphone string.

pdwNeeded

[out] Address of a variable that receives the number of bytes needed for the microphone string.

Some speech-recognition engines use the microphone name to improve the accuracy of recognition.

The microphone for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.