Share via


midiInMessage

The midiInMessage function sends a message to the MIDI device driver.

DWORD midiInMessage(
  HMIDIIN    deviceID,  
  UINT       msg,      
  DWORD_PTR  dw1,      
  DWORD_PTR  dw2       
);

Parameters

deviceID

Identifier of the MIDI device that receives the message. You must cast the device ID to the HMIDIIN handle type. If you supply a handle instead of a device ID, the function fails and returns the MMSYSERR_NOSUPPORT error code.

msg

Message to send.

dw1

Message parameter.

dw2

Message parameter.

Return Values

Returns the value returned by the audio device driver.

Remarks

This function is used only for driver-specific messages that are not supported by the MIDI API.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.
**  Library:** Use Winmm.lib.

See Also

Musical Instrument Digital Interface (MIDI), MIDI Functions