MMRESULT midiOutLongMsg(hMidiOut, lpMidiOutHdr, wSize) | |||
HMIDIOUT hMidiOut; | |||
LPMIDIHDR lpMidiOutHdr; | |||
UINT wSize; |
The midiOutLongMsg function sends a system-exclusive MIDI message to the specified MIDI output device.
hMidiOut
Specifies a handle to the MIDI output device.
lpMidiOutHdr
Specifies a far pointer to a MIDIHDR structure that identifies the MIDI data buffer.
wSize
Specifies the size of the MIDIHDR structure.
Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:
Value | Meaning |
MMSYSERR_INVALHANDLE | Specified device handle is invalid. |
MIDIERR_UNPREPARED | lpMidiOutHdr hasn't been prepared. |
MIDIERR_NOTREADY | The hardware is busy with other data. |
The data buffer must be prepared with midiOutPrepareHeader before it is passed to midiOutLongMsg. The MIDIHDR data structure and the data buffer pointed to by its lpData field must be allocated with GlobalAlloc using the GMEM_MOVEABLE and GMEM_SHARE flags, and locked with GlobalLock. The MIDI output device driver determines whether the data is sent synchronously or asynchronously.
midiOutShortMsg, midiOutPrepareHeader