The WIDM_CLOSE message requests a waveform input driver to close a specified device instance that was previously opened with a WIDM_OPEN message.
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 waveInClose return values in the Win32 SDK.
A client sends the WIDM_CLOSE message by calling the user-mode driver’s widMessage entry point, passing the specified parameters.
If the driver has not filled and returned all of the buffers received with WIDM_ADDBUFFER messages, it should not close the instance and should instead return WAVERR_STILLPLAYING.
After the driver closes the device instance it should send a WIM_CLOSE callback message to the client.
For additional information, see Transferring Waveform Input Data.