The WIDM_RESET message requests a waveform input driver to stop recording and return all buffers in the input queue to the client.
Parameters
uDeviceId
Device identifier (0, 1, 2, and so on) for the target device.
uMsg
WIDM_RESET
dwUser
Device instance identifier.
dwParam1
Not used.
dwParam2
Not used.
Return Value
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 waveInReset return values in the Win32 SDK.
Comments
A client sends the WIDM_RESET message by calling the user-mode driver’s widMessage entry point, passing the specified parameters.
Typically, the user-mode driver stops recording by calling DeviceIoControl, sending the kernel-mode driver an IOCTL_WAVE_SET_STATE control code.
For each buffer remaining in the driver’s input queue (see WIDM_ADDBUFFER), the driver should set WHDR_DONE and clear WHDR_INQUEUE in the dwFlags member of the buffer’s WAVEHDR structure, and also set the structure’s dwBytesRecorded member. Finally, a WIM_DATA callback message should be sent for each buffer.
For additional information, see Transferring Waveform Input Data.