The WIDM_STOP message requests a waveform input driver to stop recording.
The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or WAVERR error codes defined in mmsystem.h. See waveInStop return values in the Win32 SDK.
A client sends the WIDM_STOP message by calling the user-mode driver’s widMessage entry point, passing the specified parameters.
If a buffer in the input queue (see WIDM_ADDBUFFER) has been partially filled, the driver should treat it as a full buffer and return it to the client (see WIDM_START). Empty buffers should remain in the queue.
If this message is received and recording is already stopped, the driver should return MMSYSERR_NOERROR.
Typically, the user-mode driver stops recording by calling DeviceIoControl, sending the kernel-mode driver an IOCTL_WAVE_SET_STATE control code.
For additional information, see Transferring Waveform Input Data.