The MIDM_ADDBUFFER message requests a user-mode MIDI input driver to add an empty input buffer to its input buffer queue.
The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or MIDIERR error codes defined in mmsystem.h. See midiInAddBuffer return values in the Win32 SDK.
A client sends the AUXDM_SETVOLUME message by calling the user-mode driver’s midMessage entry point, passing the specified parameters.
If the MHDR_PREPARED flag is not set in the dwFlags member of the MIDIHDR structure, the driver should return MIDIERR_UNPREPARED. If the flag is set, the driver should:
Only system-exclusive events (long messages) should be placed in the buffer. Other MIDI events (short messages) should be passed to the client with a MIM_DATA callback message.
The user-mode driver starts recording when it receives a MIDM_START message.
For additional information, see Transferring MIDI Input Data.