Share via


MidiInProc

The MidiInProc function is the callback function for handling incoming MIDI messages. MidiInProc is a placeholder for the application-supplied function name. The address of this function can be specified in the callback-address parameter of the midiInOpen function.

void CALLBACK MidiInProc(
  HMIDIIN hMidiIn,  
  UINT wMsg,        
  DWORD_PTR dwInstance, 
  DWORD_PTR dwParam1,   
  DWORD_PTR dwParam2    
);

Parameters

hMidiIn

Handle to the MIDI input device.

wMsg

MIDI input message.

dwInstance

Instance data supplied with the midiInOpen function.

dwParam1

Message parameter.

dwParam2

Message parameter.

Return Values

This function does not return a value.

Remarks

The meaning of the dwParam1 and dwParam2 parameters is specific to the message type. For more information, see the topics for messages, such as MIM_DATA.

Applications should not call any system-defined functions from inside a callback function, except for EnterCriticalSection, LeaveCriticalSection, midiOutLongMsg, midiOutShortMsg, OutputDebugString, PostMessage, PostThreadMessage, SetEvent, timeGetSystemTime, timeGetTime, timeKillEvent, and timeSetEvent.

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.

See Also

Musical Instrument Digital Interface (MIDI), MIDI Functions, EnterCriticalSection, LeaveCriticalSection, midiInOpen, midiOutLongMsg, midiOutShortMsg, OutputDebugString, PostMessage, PostThreadMessage, SetEvent, timeGetSystemTime, timeGetTime, timeKillEvent, timeSetEvent,