WIDM_ADDBUFFER

The WIDM_ADDBUFFER requests a user-mode waveform input driver to add an empty input buffer to its input buffer queue.

Parameters

uDeviceId

Device identifier (0, 1, 2, and so on) for the target device.

uMsg

WIDM_ADDBUFFER

dwUser

Device instance identifier.

dwParam1

Pointer to a WAVEHDR structure identifying the buffer. (The WAVEHDR structure is described in the Win32 SDK.)

dwParam2

Size of the WAVEHDR structure in bytes.

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 waveInAddBuffer return values in the Win32 SDK.

Comments

A client sends the message by calling the user-mode driver’s widMessage entry point, passing the specified parameters.

If the WHDR_PREPARED flag is not set in the dwFlags member of the WAVEHDR structure, the driver should return WAVERR_UNPREPARED. If the flag is set, the driver should:

·Clear the WHDR_DONE flag.

·Set the WHDR_INQUEUE flag.

·Place the empty buffer in its input queue.

·Return control to the client with a return value of MMSYSERR_NOERROR.

The user-mode driver starts recording when it receives a WIDM_START message.

For additional information, see Transferring Waveform Input Data.