midiInAddBuffer function (mmeapi.h)
The midiInAddBuffer function sends an input buffer to a specified opened MIDI input device. This function is used for system-exclusive messages.
Syntax
MMRESULT midiInAddBuffer(
HMIDIIN hmi,
LPMIDIHDR pmh,
UINT cbmh
);
Parameters
hmi
Handle to the MIDI input device.
pmh
Pointer to a MIDIHDR structure that identifies the buffer.
cbmh
Size, in bytes, of the MIDIHDR structure.
Return value
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.
Return code | Description |
---|---|
|
The buffer pointed to by lpMidiInHdr is still in the queue. |
|
The buffer pointed to by lpMidiInHdr has not been prepared. |
|
The specified device handle is invalid. |
|
The specified pointer or structure is invalid. |
|
The system is unable to allocate or lock memory. |
Remarks
When the buffer is filled, it is sent back to the application.
The buffer must be prepared by using the midiInPrepareHeader function before it is passed to the midiInAddBuffer function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mmeapi.h (include Windows.h) |
Library | Winmm.lib |
DLL | Winmm.dll |